Error using Image data layer with matcaffe

375 views
Skip to first unread message

Tim

unread,
Aug 11, 2015, 9:00:39 AM8/11/15
to Caffe Users
Hi, 

I created my own net layout and started training with according to the imagenet tutorial: editing the train_imagenet.sh to my solver.prototxt 
caffe starts training without any problem. 

Now I would like to try different parameters. Therefor I would like to start the training from matcaffe, which fails with error: io.cpp:77] Could not open or find file /home/path/to/my/file.png

In matlab my code looks like this: 

% Load solver to caffe
solver = caffe.Solver(solver_file);

solver.step(iteration);



In my layout I use the image data layer pointing to a text file where all images are stored as: /home/path/to/my/file1.png 0 


image_data_param {
source: " /home/path/to/my/files.txt"
batch_size: 100
is_color: false

I tried several configs for the text file, like: 
~/path/to/my/file1.png 0 
../path/to/my/file1.png 0 
../../path/to/my/file1.png 0 
../../../path/to/my/file1.png 0 
and so on but nothing works. 

Starting training from matlab with lmdb files works (used it in other project, but this time I need to load images from text file)

Again, starting training from console works with the absolute path but failing starting from matlab. Any idea? 

Tim

unread,
Aug 11, 2015, 9:24:03 AM8/11/15
to Caffe Users
Converting from .png to .bmp seems to fix the problem. However I tried it just for one image... I gonna try it for the hole data set and report. 

Is this a bug? I guess it's because of opencv imread function not handling png files?

Tim

unread,
Aug 11, 2015, 11:06:53 AM8/11/15
to Caffe Users
with .bmp files no problems any more


Am Dienstag, 11. August 2015 15:00:39 UTC+2 schrieb Tim:
Reply all
Reply to author
Forward
0 new messages