File Exchange

image thumbnail

Demos from " Deep Learning for Computer Vision" Webinar

version 1.0.0.0 (18.4 MB) by Johanna Pingel
Files Used in "Deep Learning for Computer Vision" Webinar - 17A

18 Downloads

Updated 03 May 2017

View License

These examples go through the 3 demos explained in the "Deep Learning for Computer Vision" Webinar
https://www.mathworks.com/videos/deep-learning-for-computer-vision-120997.html

The demos are as follows:
- Object Classification using a Pre-trained Network
- Transfer Learning - altering AlexNet to perform vehicle classification
- Object Detection using Deep Learning (Faster R-CNN)
**Please note: these are the demos only and a small set of images. No pre-trained networks are included

Comments and Ratings (26)

angel lerma

Hello:
Greetings from Mexico, excellent contribution, very interesting truth.
I tell you that I am a newbie in MatLab and download the example to execute it like this, I am trying to execute demo 3 but it marks me an error in the following line:

% Run the detector.
[bboxes, scores] = detect (detector, I);

The error is as follows:
Error using gpuArray / double
Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice ()'. If the problem persists, reset the GPU by calling 'gpuDevice (1)'.

I already did what he advises and nothing.

My work environment:
Win 10, MatLab R2018b, 8 RAM, GPU 2 RAM

Any idea of a solution?

Thank you

regards
Angel

This MATLAB code is freely available to use under XLA license. I'm not certain how to cite this, you may cite the webinar or the code as you would any other video or code.

Alam Noor

Can I use your custom read function in my research ? and how i can site it. Thanks

Yh Jiang

Oh dear, I found it~~~~

Yh Jiang

dear Johanna, is the data images of cars available?

For minibatch errors, go into the createCNN function and add a parameter to the training options: 'MiniBatchSize',1

Hui Yin Lee

Hi, when i run the code for demo Object Detection using Deep Learning (Faster R-CNN) , there is an error showing "Error using vision.internal.cnn.parseInputsFasterRCNN (line 24)
The 'MiniBatchSize' training option must be set to 1 for training Fast R-CNN or Faster R-CNN object detectors. To set this
value, use the trainingOptions function."
How should i overcome it?

Alam Noor

@Johanna Pingel. Thanks for your Webinar. I'm a research student in Harbin Institute of Technology China. Can you please comment if possible. How I can use it for sheep images data-set, if dataset is not label? Second if I will label dataset than which plate form is better for facial recognition? Thanks

Very helpful introduction.

Hi, Johanna Pingel ! thanks for the Demos.
but i can't use imageLabeler's new version. Do you have any demo for R2018a?

Running TransferLearnnigDemo in Demo_TransferLearning folder often display "Error using trainNetwork (line 133)
Undefined function or variable 'plotObj'.

Error in TransferLearningDemo (line 130), net = trainNetwork(trainDS, layers, opts);"
, so it can't complete running.
Who can tell me why?

Dear Johanna, I'm pleased to read your codes. I found out that the plotTrainingAccuracy.m and
stopTrainingAtThreshold.m have some the marker "...", which should be '...'.
and I have a question: could you please tell me what is included in your vehicleRois.mat? Maybe it is
important part when we want to do object detection. Or could you tell me how do you make your
vehicleRois.mat?
Please your answer to my email address: lxzhouno1@gmail.com

I am trying to classify images into two categories viz. healthy vs diseased. I am using Alexnet for this using the transfer learning on single GPU. But since the original net is not trained on these specific class of images, the accuracy of the classification is only around 60%. So what can be done to increase the accuracy?

Hi Johanna, I want to modify Alexnet to classify Grayscale images. What changes should I make? and how? Because the first layer of Alexnet says: 227*227*3 .

Thank you in advance!

@rcjr15 - This is a challenging question because it depends on your data, and what you are trying to do - accuracy is a difficult thing to increase without trying a lot of options and seeing what helps it to improve.

A few things to try:
If you have the ability to create more images for training this could help. With the 17b release you can augment your dataset with ImageDataAugmenter
If you are not seeing the accuracy improve, you could try a different classification technique. Would a machine learning technique give higher accuracy?
as you mentioned, Alexnet doesn't have your categories or similar categories. How about a different network. Have you tried some of the models in Caffe model zoo?
Good luck!

@Biserka - I'm not sure what the problem is without debugging the code. The error appears to be something related to the number of predictions in the variable "labels" and the number of images used in the variable testDS.Labels
You can try finding out the sizes of both of these variables - they need to be the same.

When I run the code I get this error

Error using confusionmat (line 75)
G and GHAT need to have same number of rows

Error in TransferLearningDemo (line 150)
confMat = confusionmat(testDS.Labels, labels);

What could be the problem?

Sehairi K.

Hi Johanna Pingel
Thanks very much for this interesting webinar
I just need the name (or link to download) the video file played to test the CNN 28:23
Thnaks

rcjr15

@Johanna Pingel, I am trying to classify images into two categories viz. healthy vs diseased. I am using Alexnet for this using the transfer learning on single GPU. But since the original net is not trained on these specific class of images, the accuracy of the classification is only around 60%. So what can be done to increase the accuracy? I have around 500 labeled images that I could use for training and testing.

Hi @Johanna Pingel, can this be used for speaker classification?

Hi @Johanna Pingel
is there any configuration to speed up the training in a single CPU because I don't have a GPU in my laptop
really need your help, please
thank you

@xiao - The trainedNet is too large of a file to submit to file-exchange. If you take the time to train a neural network before VisualizeActivations, you can replace that name with a saved network of your choice. If you don't want to retrain the network, just use AlexNet.

xiao

@Johanna Pingel, thank you and it has worked out. but there is no 'trainedNet48_test.mat' in the downloaded files (for VisualizeActivations.m of TransferLearningdemo) . Where to get the mat file?

@xiao - the OutputFcn was introduced in r2017a - if you are running an earlier version, this section of code will not run unless you remove the OutputFcn. AlexNet should have 25 layers, can you try to re-download from here? https://www.mathworks.com/matlabcentral/fileexchange/59133-neural-network-toolbox-tm--model-for-alexnet-network
This requires r2016b

xiao

Hi, Johanna Pingel ! thanks for the Demos.
However the alexnet downloaded at Add-Ons has only 23 layers, the code is with 25 layers. And the 'OutputFcn' is not a recognized parameter for trainingOptions. The error occurs at the line of "opts = trainingOptions()". (for TransferLearningdemo)
So, Is there anything wrong?

Updates

1.0.0.0

Added link to webinar in the Description

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux