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被错误换行了:

如下绿框标记图修改caff/data/VOC0712/create_list.sh,即解决 问题

修改后再执行create_list.sh,则临时文件caff/data/VOC0712/test.txt,va.txt的内容就正确换行了

再执行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.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏专知

【专知荟萃21】视觉问答VQA知识资料全集(入门/进阶/论文/综述/视频/专家,附查看)

视觉问答(Visual Question Answering,VQA)专知荟萃 入门学习 进阶论文 Attention-Based Knowledge-bas...

4746
来自专栏专知

计算机视觉领域顶会CVPR 2018 接受论文列表

3743
来自专栏目标检测和深度学习

全球最全计算机视觉资料(3:目标追踪)

801
来自专栏Hongten

python开发_tkinter_多级子菜单

==========================================================

842
来自专栏人工智能LeadAI

长短时记忆网络LSTM(基本理论)

参考: Understanding LSTM Networks The Unreasonable Effectiveness of Recurrent Neu...

2724
来自专栏专知

【专知荟萃25】文字识别OCR知识资料全集(入门/进阶/论文/综述/代码/专家,附查看)

OCR文字,车牌,验证码识别 专知荟萃 入门学习 论文及代码 文字识别 文字检测 验证码破解 手写体识别 车牌识别 实战项目 视频 入门学习 端到端的OCR...

8048
来自专栏目标检测和深度学习

全球最全计算机视觉资料(6:问答|边缘检测|姿态估计|图像生成)

812
来自专栏用户2442861的专栏

OCR material

End-to-End Text Recognition with Convolutional Neural Networks

403
来自专栏大学生计算机视觉学习DeepLearning

深度学习(四)转--入门深度学习的一些开源代码

没错这篇又是转发的,因为觉得学习深度学习难免要从别人的代码开始,所以就转发了。不过转发的时候没找到原作者是谁,所以原作者看到不要打我-------QAQ

844
来自专栏CreateAMind

Caption Generation 比google的方法更快(6 hours v.s. several weeks)

You can use the code in this repo to genearte a MSCOCO evaluation server submiss...

1015

扫码关注云+社区