caffe icon indicating copy to clipboard operation
caffe copied to clipboard

image data not found when training

Open Engin007 opened this issue 12 years ago • 5 comments

Hello guys,

I have written a net similar to that of LeNet that takes in image_data in its data layer and according to the documentation I should include a text file that states on each row the image file name and its label. However when I run the solver I get the following error message:

image_data_layer.cpp:30] Opening file image_data_layer.cpp: 45] A total of 0 images Segmentation fault

My text file is in the root folder with my Net alongside the 20 images I am trying to feed in. I tried many things including changing the format of the text file (i am using windows WordPad).

Naturally I inspected the image_data_layer.cpp file just to make sure all the prerequisits of my text files are met. I have seen no issue with that. My only concern is: I am working on a Windows 7 OS and I am using my unis computer to do the calculation. The latter has a Linux OS. could the problem be there ? (my programming background is very limited, therefore I can't really put my finger on the problem)

Thank you

Engin007 avatar Nov 25 '14 07:11 Engin007

Try to put the absolute path to the images in the image_list.txt file that you use as source of image_data_layer

Sergio

2014-11-24 23:48 GMT-08:00 Engin007 [email protected]:

Hello guys,

I have written a net similar to that of LeNet that takes in image_data in its data layer and according to the documentation I should include a text file that states on each row the image file name and its label. However when I run the solver I get the following error message:

image_data_layer.cpp:30] Opening file image_data_layer.cpp: 45] A total of 0 images Segmentation fault

My text file is in the root folder with my Net alongside the 20 images I am trying to feed in. I tried many things including changing the format of the text file (i am using windows WordPad).

Naturally I inspected the image_data_layer.cpp file just to make sure all the prerequisits of my text files are met. I have seen no issue with that. My only concern is: I am working on a Windows 7 OS and I am using my unis computer to do the calculation. The latter has a Linux OS. could the problem be there ? (my programming background is very limited, therefore I can't really put my finger on the problem)

Thank you

— Reply to this email directly or view it on GitHub https://github.com/BVLC/caffe/issues/1476.

sguada avatar Nov 25 '14 09:11 sguada

Hello sergio

thanks for the reply, I have done that actually but it seems like its stuck like that I will attach a text file so you would check it and make sure

Engin007

\server\home\usr\samples_for_net\0001p.png 1 \server\home\usr\samples_for_net\0002p.png 1 \server\home\usr\samples_for_net\0003p.png 1 \server\home\usr\samples_for_net\0004p.png 1 \server\home\usr\samples_for_net\0005p.png 1 \server\home\usr\samples_for_net\0006p.png 1 \server\home\usr\samples_for_net\0007p.png 1 \server\home\usr\samples_for_net\0008p.png 1 \server\home\usr\samples_for_net\0009p.png 1 \server\home\usr\samples_for_net\0010p.png 1 \server\home\usr\samples_for_net\0001.png 0 \server\home\usr\samples_for_net\0002.png 0 \server\home\usr\samples_for_net\0003.png 0 \server\home\usr\samples_for_net\0004.png 0 \server\home\usr\samples_for_net\0005.png 0 \server\home\usr\samples_for_net\0006.png 0 \server\home\usr\samples_for_net\0007.png 0 \server\home\usr\samples_for_net\0008.png 0 \server\home\usr\samples_for_net\0009.png 0 \server\home\usr\samples_for_net\0010.png 0

Engin007 avatar Nov 25 '14 09:11 Engin007

It looks ok. Check that you can actually read those files. It could the end of line.

On Tuesday, November 25, 2014, Engin007 [email protected] wrote:

Hello sergio

thanks for the reply, I have done that actually but it seems like its stuck like that I will attach a text file so you would check it and make sure

Engin007

\server\home\usr\samples_for_net\0001p.png 1 \server\home\usr\samples_for_net\0002p.png 1 \server\home\usr\samples_for_net\0003p.png 1 \server\home\usr\samples_for_net\0004p.png 1 \server\home\usr\samples_for_net\0005p.png 1 \server\home\usr\samples_for_net\0006p.png 1 \server\home\usr\samples_for_net\0007p.png 1 \server\home\usr\samples_for_net\0008p.png 1 \server\home\usr\samples_for_net\0009p.png 1 \server\home\usr\samples_for_net\0010p.png 1 \server\home\usr\samples_for_net\0001.png 0 \server\home\usr\samples_for_net\0002.png 0 \server\home\usr\samples_for_net\0003.png 0 \server\home\usr\samples_for_net\0004.png 0 \server\home\usr\samples_for_net\0005.png 0 \server\home\usr\samples_for_net\0006.png 0 \server\home\usr\samples_for_net\0007.png 0 \server\home\usr\samples_for_net\0008.png 0 \server\home\usr\samples_for_net\0009.png 0 \server\home\usr\samples_for_net\0010.png 0

— Reply to this email directly or view it on GitHub https://github.com/BVLC/caffe/issues/1476#issuecomment-64329688.

Sergio

sguada avatar Nov 25 '14 09:11 sguada

I guess it was a typing error that had me searching for 3 hours. I used the image_data parameters with data_param{ ......} instead of image_data_param{......}

Thank you for your help ill close this thread

Engin007 avatar Nov 25 '14 13:11 Engin007

Can anyone help me with this error ?

I0830 11:16:13.044762 16727 convert_imageset.cpp:86] Shuffling data I0830 11:16:13.190182 16727 convert_imageset.cpp:89] A total of 0 images. I0830 11:16:13.190224 16727 convert_imageset.cpp:92] encode_type specified, assuming encoded=true. I0830 11:16:13.190408 16727 db_lmdb.cpp:35] Opened lmdb lmdb

my text file includes the correct path to the images. I want to create a lmdb using convert_imageset built-in code.

aharishkumar avatar Aug 30 '16 05:08 aharishkumar