Use deep learning to:
- Recognize objects using a pre-trained model
- Perform transfer learning to discriminate between two classes using a pre-trained 1000 class network
Avi Nehemiah (2019). Deep Learning for Computer Vision Demo Code (https://www.mathworks.com/matlabcentral/fileexchange/57116-deep-learning-for-computer-vision-demo-code), MATLAB Central File Exchange. Retrieved .
1.1.0.1 | Updated license |
|
1.1.0.0 | Updated required product list. |
Create scripts with code, output, and formatted text in a single executable document.
angel lerma (view profile)
Hello
Greetings from Mexico, excellent webinar and thanks for sharing.
I have an error and I do not know how to solve it, could you help me by giving me an orientation?
The error is in the following lines:
featureLayer = 'fc7';
trainingFeatures = activations (convnet, trainingSet, featureLayer, ...
'MiniBatchSize', 32, 'OutputAs', 'columns');
And what it marks is the following:
"
Error using matlab.io.datastore.ImageDatastore / read (line 74)
Error using ReadFcn @ (filename) readAndPreprocessImage (filename) function handle for file
C: \ DeepLearning \ data \ Images \ Arterio_arterial \ CAA_1.png.
Undefined function 'readAndPreprocessImage' for input arguments of type 'char'.
Error in PetDetectionRecognitionScript> @ (filename) readAndPreprocessImage (filename)
Error in nnet.internal.cnn.ImageDatastoreMiniBatchDatastore / read (line 31)
[data, info] = self.imds.read ();
Error in nnet.internal.cnn.MiniBatchDatastoreDispatcher / getExampleInfoFromDatastore (line 312)
[data, info] = read (this.Datastore);
Error in nnet.internal.cnn.MiniBatchDatastoreDispatcher (line 118)
[exampleImage, exampleResponse, this.ResponseMetaData] = getExampleInfoFromDatastore (this);
Error in nnet.internal.cnn.DataDispatcherFactory.createDataDispatcher (line 89)
dispatcher = nnet.internal.cnn.MiniBatchDatastoreDispatcher (datasource, miniBatchSize, endOfEpoch, shuffleOption, precision);
Error in SeriesNetwork> iDataDispatcher (line 1152)
dispatcher = nnet.internal.cnn.DataDispatcherFactory.createDataDispatcher (...
Error in SeriesNetwork / activations (line 806)
dispatcher = iDataDispatcher (X, miniBatchSize, precision, ...
Error in PetDetectionRecognitionScript (line 77)
trainingFeatures = activations (convnet, trainingSet, featureLayer, ...
"
I have Matlab 2018b in Win 10 64 bit ......
Greetings and thanks in advance
Angel Lerma
Alam Noor (view profile)
@Kimuya Alex, It is the problem of matlab version. Install new version
Eduardo Benavides Astudillo (view profile)
Kimuya Alex (view profile)
I am Using R2015b Matlab version. I am getting the erroe: "Undefined function or variable 'helperImportMatConvNet". Is there a way to resolve this please? Or is the problem the Matlab Version i am using? Any assistance would be much appreciated pls.
Valliappan RM (view profile)
how to find the accuracy for this algorithm
As Has (view profile)
if my data set about lung images which net library i should use as a pre training ?? and i can't understand how - in may case - using only the first 2 layers within my data set
Baodong Wang (view profile)
good , but can't
xiao (view profile)
Hi, thanks for the demo.
I have a problem that how to get the 'cat.avi' and 'Hobbes.png'?
kavitha r (view profile)
Riadh Ayachi (view profile)
for images go to kaggel catvsdog competetion
Chandra Kiran Dubey (view profile)
code*
Chandra Kiran Dubey (view profile)
i am unable to run the cord.it shows error
zgw (view profile)
Everything is ok unless when it runs to line 131. It showed that 'Struct contents reference from a non-struct array object.'. How should i sovle it? Thank you!
yankun cao (view profile)
Hi, I met a problem when running this program. It showed that Undefined function or variable 'helperImportMatConvNet'.How should I solve it?
Florian M (view profile)
Florian M (view profile)
dimpy yadav (view profile)
Hi
I have Matlab 2016 and Visual studio 2013. What else is required to run the above program? CUDA 7.5 is neccessary?
Lankanatha Ekanayake (view profile)
you need to create your own images in a directory
'C:\DeepLearning\data\PetImages'
John DeBriere (view profile)
So where are the petImages?
the code runs fine up to:
dataFolder = 'C:\DeepLearning\data\PetImages';
categories = {'Cat', 'Dog'};
imds = imageDatastore(fullfile(dataFolder, categories), 'LabelSource', 'foldernames');
Files not found!
Can they be downloaded???
Shahab Ajloo (view profile)
Hi
I have a problem with the frame detection box. When i play the video of dog, the frame can not recognize all the body of dog and that just focus on head or eye or leg... so i have problem with precise recognizing. Can you help me to fix this problem?
Best regards
pei liu (view profile)
how could I obtain cat and dog image?
f l (view profile)
Avi Nehemiah (view profile)
Anslem - the dataset we used was something we collected internally at MathWorks. Kaggle has a similar dataset with images of cats and dogs that you can try with the same code.
Shravankumar P (view profile)
I have watched the webinar on Mathworks website, Shahank and avi both of you did a great job. The explanation was pellucid. I really enjoy working with the MATLAB because of its clear workflows and the apps which saves us a lot of time and energy. Thanks for making things simple.
Anselm Griffin (view profile)
Can I just check is the data set for the cats and dogs from ImageNet dataset or are they from your own dataset that you collected in an earlier Matlab webinar? Thanks Anselm Griffin
Hyun K. Suh (view profile)