Error: Unable to find variable while trying to recognize results using trained network.
Mostrar comentarios más antiguos
I am trying to detect pedestrian using thermal dataset. I was able to train using custome dataset using DarkNet53, using Deep Network Designer script. After that when I am trying to test the results I am facing error. Before it was working fine, now I am trying using new dataset but it should not be the problem. I have attached my .m file and some sample images, if you can check the code and let me know where I need to modify it would be really helpful as this is part of my project.
Thank you very much in advance.
14 comentarios
Walter Roberson
el 16 de En. de 2023
Nothing attached yet
Partha Dey
el 16 de En. de 2023
Editada: Partha Dey
el 16 de En. de 2023
Walter Roberson
el 16 de En. de 2023
please post a complete copy of the error message
Partha Dey
el 17 de En. de 2023
Walter Roberson
el 17 de En. de 2023
trainingSetup = load("C:\Users\Neel\Documents\MATLAB\YOLOv3ObjectDetection\DarkNet53\trainednetwork.mat");
%% Import Data
% Import training and validation data.
imdsTrain = imageDatastore("C:\Users\Neel\Documents\MATLAB\YOLOv3ObjectDetection\DarkNet53\Dataset1","IncludeSubfolders",true,"LabelSource","foldernames");
We do not have that .mat file or those training directories.
Partha Dey
el 18 de En. de 2023
Walter Roberson
el 18 de En. de 2023
I ran your code on my computer. It told me that it could not find the mat file on my computer.
Without those files I cannot test the code on my computer and debug the problem.
I can make guesses about what is wrong but they might be on the wrong track completely.
Partha Dey
el 18 de En. de 2023
Partha Dey
el 18 de En. de 2023
Partha Dey
el 27 de En. de 2023
Walter Roberson
el 27 de En. de 2023
We do not have your "Dataset1" folder.
Partha Dey
el 28 de En. de 2023
Walter Roberson
el 29 de En. de 2023
trainingSetup = load("C:\Users\Neel\Documents\MATLAB\YOLOv3ObjectDetection\DarkNet53\trainednetwork.mat");
The result of load() of a .mat file, is a struct that has one field for each variable loaded from the file.
That particular file only has one variable, trainedNetwork_2
tempLayers = [imageInputLayer([256 256 3],"Name","input","Normalization","rescale-zero-one","Max",trainingSetup.input.Max,"Min",trainingSetup.input.Min)
convolution2dLayer([3 3],32,"Name","conv1","Padding","same","Bias",trainingSetup.conv1.Bias,"Weights",trainingSetup.conv1.Weights)
batchNormalizationLayer("Name","batchnorm1","Offset",trainingSetup.batchnorm1.Offset,"Scale",trainingSetup.batchnorm1.Scale,"TrainedMean",trainingSetup.batchnorm1.TrainedMean,"TrainedVariance",trainingSetup.batchnorm1.TrainedVariance)
The .mat file does not contain any variable named input or conv1 or batchnorm1 .
The DAGNetwork object trainedNetwork_2 does not contain fields or properties with those names either.
Partha Dey
el 30 de En. de 2023
Respuestas (0)
Categorías
Más información sobre Image Data Workflows en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!