SSD(Single Shot MultiBox Detector):create_list.sh io.cpp:187 Could not open or find file

今天在为SSD训练自己的数据时执行caff/data/VOC0712/create_list.sh时报了好多这个错误:

E0412 16:28:31.653440 5008 io.cpp:187] Could not open or find file/home/guyadong/data/VOCdevkit/facedata/JPEGImages/070010

就是找不到指定的图像文件,但观察上面的log发现,get_image_size要打开的文件是070010,没有.jpg后缀,所以自然是找不到,查了半天总算找到原因。
根本的原因是VOC2007/ImageSets/Main/下的训练文件 test.txt,trainval.txt(我在windows下用程序生成的)的分行符是windows格式的换行(0d0a)(\r\n),而create_list.sh则按unix格式换行(0a)(\n)来处理的,导致生成的临时文件(caffe/data/VOC0712/test.txt,val.txt)的换行都是错的,如下图.jpg被错误换行了:
SSD(Single Shot MultiBox Detector):create_list.sh io.cpp:187 Could not open or find file_第1张图片
如下绿框标记图修改caff/data/VOC0712/create_list.sh,即解决 问题
SSD(Single Shot MultiBox Detector):create_list.sh io.cpp:187 Could not open or find file_第2张图片
修改后再执行create_list.sh,则临时文件caff/data/VOC0712/test.txt,va.txt的内容就正确换行了
SSD(Single Shot MultiBox Detector):create_list.sh io.cpp:187 Could not open or find file_第3张图片

再执行create_list.sh则一切正常

guyadong@gyd-u16:~/tmp/cafe-ssd$ ./data/facedata/create_list.sh Create list for facedata trainval…
Create list for facedata test…
I0412 16:47:31.735117 5915 get_image_size.cpp:61] A total of 64152 images.
I0412 16:47:32.441088 5915 get_image_size.cpp:100] Processed 1000 files.
I0412 16:47:33.163386 5915 get_image_size.cpp:100] Processed 2000 files.
I0412 16:47:33.793678 5915 get_image_size.cpp:100] Processed 3000 files.
I0412 16:47:34.383620 5915 get_image_size.cpp:100] Processed 4000 files.
I0412 16:47:35.021188 5915 get_image_size.cpp:100] Processed 5000 files.
I0412 16:47:35.678146 5915 get_image_size.cpp:100] Processed 6000 files.
I0412 16:47:36.291211 5915 get_image_size.cpp:100] Processed 7000 files.
I0412 16:47:36.902132 5915 get_image_size.cpp:100] Processed 8000 files.
I0412 16:47:37.620117 5915 get_image_size.cpp:100] Processed 9000 files.
I0412 16:47:38.415658 5915 get_image_size.cpp:100] Processed 10000 files.
I0412 16:47:39.196408 5915 get_image_size.cpp:100] Processed 11000 files.
I0412 16:47:39.955487 5915 get_image_size.cpp:100] Processed 12000 files.
I0412 16:47:40.751711 5915 get_image_size.cpp:100] Processed 13000 files.
I0412 16:47:41.587662 5915 get_image_size.cpp:100] Processed 14000 files.
I0412 16:47:42.361137 5915 get_image_size.cpp:100] Processed 15000 files.
I0412 16:47:43.185786 5915 get_image_size.cpp:100] Processed 16000 files.
I0412 16:47:44.023108 5915 get_image_size.cpp:100] Processed 17000 files.
I0412 16:47:44.839643 5915 get_image_size.cpp:100] Processed 18000 files.
I0412 16:47:45.613772 5915 get_image_size.cpp:100] Processed 19000 files.
I0412 16:47:46.467950 5915 get_image_size.cpp:100] Processed 20000 files.
I0412 16:47:47.240926 5915 get_image_size.cpp:100] Processed 21000 files.
I0412 16:47:48.030536 5915 get_image_size.cpp:100] Processed 22000 files.
I0412 16:47:48.808050 5915 get_image_size.cpp:100] Processed 23000 files.
I0412 16:47:49.573930 5915 get_image_size.cpp:100] Processed 24000 files.
I0412 16:47:50.296659 5915 get_image_size.cpp:100] Processed 25000 files.
I0412 16:47:51.137468 5915 get_image_size.cpp:100] Processed 26000 files.
I0412 16:47:51.965564 5915 get_image_size.cpp:100] Processed 27000 files.
I0412 16:47:52.748363 5915 get_image_size.cpp:100] Processed 28000 files.
I0412 16:47:53.545373 5915 get_image_size.cpp:100] Processed 29000 files.
I0412 16:47:54.313802 5915 get_image_size.cpp:100] Processed 30000 files.
I0412 16:47:55.063397 5915 get_image_size.cpp:100] Processed 31000 files.
I0412 16:47:55.833818 5915 get_image_size.cpp:100] Processed 32000 files.
I0412 16:47:56.593185 5915 get_image_size.cpp:100] Processed 33000 files.
I0412 16:47:57.318747 5915 get_image_size.cpp:100] Processed 34000 files.
I0412 16:47:58.106588 5915 get_image_size.cpp:100] Processed 35000 files.
I0412 16:47:58.874009 5915 get_image_size.cpp:100] Processed 36000 files.
I0412 16:47:59.662654 5915 get_image_size.cpp:100] Processed 37000 files.
I0412 16:48:00.391137 5915 get_image_size.cpp:100] Processed 38000 files.
I0412 16:48:01.253373 5915 get_image_size.cpp:100] Processed 39000 files.
I0412 16:48:02.372660 5915 get_image_size.cpp:100] Processed 40000 files.
I0412 16:48:03.551955 5915 get_image_size.cpp:100] Processed 41000 files.
I0412 16:48:05.022789 5915 get_image_size.cpp:100] Processed 42000 files.
I0412 16:48:06.376894 5915 get_image_size.cpp:100] Processed 43000 files.
I0412 16:48:07.373198 5915 get_image_size.cpp:100] Processed 44000 files.
I0412 16:48:08.421833 5915 get_image_size.cpp:100] Processed 45000 files.
I0412 16:48:09.321070 5915 get_image_size.cpp:100] Processed 46000 files.
I0412 16:48:10.618541 5915 get_image_size.cpp:100] Processed 47000 files.
I0412 16:48:11.719383 5915 get_image_size.cpp:100] Processed 48000 files.
I0412 16:48:13.171823 5915 get_image_size.cpp:100] Processed 49000 files.
I0412 16:48:14.412339 5915 get_image_size.cpp:100] Processed 50000 files.
I0412 16:48:15.605201 5915 get_image_size.cpp:100] Processed 51000 files.
I0412 16:48:16.961227 5915 get_image_size.cpp:100] Processed 52000 files.
I0412 16:48:18.067579 5915 get_image_size.cpp:100] Processed 53000 files.
I0412 16:48:18.919296 5915 get_image_size.cpp:100] Processed 54000 files.
I0412 16:48:19.524323 5915 get_image_size.cpp:100] Processed 55000 files.
I0412 16:48:20.154620 5915 get_image_size.cpp:100] Processed 56000 files.
I0412 16:48:20.755278 5915 get_image_size.cpp:100] Processed 57000 files.
Premature end of JPEG file
I0412 16:48:21.353775 5915 get_image_size.cpp:100] Processed 58000 files.
Premature end of JPEG file
I0412 16:48:21.967610 5915 get_image_size.cpp:100] Processed 59000 files.
I0412 16:48:22.725572 5915 get_image_size.cpp:100] Processed 60000 files.
I0412 16:48:23.532981 5915 get_image_size.cpp:100] Processed 61000 files.
I0412 16:48:24.299060 5915 get_image_size.cpp:100] Processed 62000 files.
I0412 16:48:25.078511 5915 get_image_size.cpp:100] Processed 63000 files.
I0412 16:48:25.844919 5915 get_image_size.cpp:100] Processed 64000 files.
I0412 16:48:25.968722 5915 get_image_size.cpp:105] Processed 64152 files.

你可能感兴趣的:(deeplearning)