MATLAB Answers

R-CNN stop sign detector code

17 views (last 30 days)
I am trying understand the code for stop sign detector using cnn but i do no identify the "Command" in below sentencie of the program: "helperCIFAR10Data.download(url,cifar10Data); I look for help but it shows an error msg
  9 Comments
Walter Roberson
Walter Roberson on 18 Mar 2019
Could you clarify what problem you are having? Please post your code.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 8 Nov 2016
That code requires R2016b or later.
  8 Comments
Walter Roberson
Walter Roberson on 11 Aug 2020
These days,
fullfile(matlabroot,'examples','deeplearning_shared','main', 'helperCIFAR10Data.m')

Sign in to comment.

More Answers (5)

Vignesh Ganapathiraman
Vignesh Ganapathiraman on 7 May 2018
Or you can just add the path at the start
addpath([matlabroot,'/examples','/vision','/main']);
  1 Comment
Zekun
Zekun on 20 Apr 2019
Great! This solved my problem!~ Thanks!

Sign in to comment.


Ali
Ali on 1 Nov 2017
Edited: Walter Roberson on 1 Nov 2017
Hi guys,
The file is really at the directory provided by Walter Roberson, however the error message still there.
to overcome this problem, you may follow these steps:
  1. go to fullfile(matlabroot,'examples', 'vision', 'main', helperCIFAR10Data.m', find the file there and open it.
  2. inside 'helperCIFAR10Data.m' you will find 4 functions (download,load, loadBatchAsFourDimensionalArray, convertLabelsToCategorical). Copy each function to a new script and save them. you can give 'load' function to another name to avoid conflict with the same Matlab-builtin function.
  3. use the code provided on Mathworks website but remove the prefix'helperCIFAR10Data'
% Download CIFAR-10 data to a temporary directory
location = 'C:\Users\JICA\Desktop\Object Detection Using Deep Learning\';
url = 'https://www.cs.toronto.edu/~kriz/cifar-10-matlab.tar.gz';
download(url, location);
%%Load
% Load the CIFAR-10 training and test data.
[trainingImages, trainingLabels, testImages, testLabels] = Dataloading(location);
Each image is a 32x32 RGB image and there are 50,000 training samples.
size(trainingImages)
hope this helps
Ali
  5 Comments
Walter Roberson
Walter Roberson on 5 Mar 2019
Please show which function you are calling, and show how you are calling it.
Did you follow Ali's suggestion to rename load ? That would include changing the references to the function so that you do not accidentally invoke MATLAB's built-in load()

Sign in to comment.


googon
googon on 2 Nov 2017
Just copy the 'helperCIFAR10Data.m' to your temporary directory, and then run. Good luck!

Saif Hussein
Saif Hussein on 28 Sep 2017
Edited: Walter Roberson on 19 Oct 2017
Undefined variable "helperCIFAR10Data" or class "helperCIFAR10Data.load".
l have email the matlab team many times, they didn't solve the problem. l do believe the problem with matlab copy under Mac,
  3 Comments
Walter Roberson
Walter Roberson on 19 Oct 2017
In R2017b I find it at
fullfile(matlabroot,'examples', 'vision', 'main', 'helperCIFAR10Data.m')
This requires the Computer Vision toolbox.

Sign in to comment.


Nicola Gaburro
Nicola Gaburro on 2 Oct 2017
I'm having the same issue with Matlab R2017b When running the command
helperCIFAR10Data.download(url, cifar10Data);
it shows the error
Undefined variable "helperCIFAR10Data" or class "helperCIFAR10Data.download". Seems like helperCIFAR10Data class is missing
  6 Comments
Walter Roberson
Walter Roberson on 17 May 2020
The helperCIFAR10Data class must be on your MATLAB path.
addpath(fullfile(matlabroot,'examples','deeplearning_shared','main'))

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by