Error creating imdb function for matconvnet

1 view (last 30 days)
shivasakthi
shivasakthi on 10 Feb 2017
Answered: Karakule on 20 Feb 2017
Hi, I attempted to use the createIMDB function for CNN, as explained in the Hands on DL, by German Ros. (I know they have a dedicated google group for matconvnet, I have posed the query but no one replied on this :( ) I took 57000 RGB images of one class, in .png format and other 57000 images, for the other class. Find attached the codes as available in his website. I first attempted with the createIMDB_RAM code (my PC has 24Gb RAM) but I got error in this line:
images.data = zeros(H, W, CH, N, 'single');
The error read that Matlab has a restriction for the array size, since in my case the value of N is 114000, it said it cant create an array of such a big size.
I then attempted with the createIMDB_DISK function, specified to be used, when the system does not have adequate RAM memory. I have got error in this:
positives = dir([folder '/cat/*.png']);
negatives = dir([folder '/nocat/*.png']);
imref = imread([folder '/cat/', positives(1).name]); % index exceed matrix dimensions
[H, W, CH] = size(imref);
The error read index exceed matrix dimensions at the line imref.
I have attached both the codes herewith. Kindly assist me in getting the error corrected.

Answers (1)

Karakule
Karakule on 20 Feb 2017
How do we create an imdb file? I have 10 class and each class I have over 200 images. Now I want to make my own imdb file to run matconvnet codes. Please help me. How can I make imdb files from images.

Community Treasure Hunt

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

Start Hunting!