图片均为jpg格式,微调网络的时候出现了Corrupt JPEG data问题,但网络还在正常训练,是不是数据有损坏呢?

I0129 02:47:22.681275 17219 solver.cpp:294] Iteration 0, Testing net (#0)
I0129 02:47:49.307893 17219 solver.cpp:343] Test net output #0: accuracy = 0.0124
I0129 02:47:49.307915 17219 solver.cpp:343] Test net output #1: loss = 3.93629 (* 1 = 3.93629 loss)
I0129 02:47:49.431917 17219 solver.cpp:214] Iteration 0, loss = 4.25533
I0129 02:47:49.431941 17219 solver.cpp:229] Train net output #0: loss = 4.25533 (* 1 = 4.25533 loss)
I0129 02:47:49.431963 17219 solver.cpp:486] Iteration 0, lr = 0.001
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: bad Huffman code
Corrupt JPEG data: premature end of data segment
I0129 02:51:42.264668 17219 solver.cpp:361] Snapshotting to models/finetune_ads/CaffeNet/160128/finetune_ads_caffenet_iter_1000.caffemodel
I0129 02:51:43.460571 17219 solver.cpp:369] Snapshotting solver state to models/finetune_ads/CaffeNet/160128/finetune_ads_caffenet_iter_1000.solverstate
I0129 02:51:43.659705 17219 solver.cpp:294] Iteration 1000, Testing net (#0)
I0129 02:51:51.461612 17219 solver.cpp:343] Test net output #0: accuracy = 0.757
I0129 02:51:51.461634 17219 solver.cpp:343] Test net output #1: loss = 0.740786 (* 1 = 0.740786 loss)
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: bad Huffman code
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
已邀请:

李扬 - 密码六个一

赞同来自:

谷歌搜了一下。`Corrupt JPEG data: premature end of data segment`  不是 Caffe 上的问题,也会出现在其他应用上。出现这种情况的可能原因是你在下载图片的时候出错了。
 
检查你的图片是不是出错的方法是看图片的最开的两个字节是不是 `FF D8`,最后的两个字节是不是 `FF D9`。例如,可以用 `vim -b 不知火舞.jpg` 来查看图片的数据,其中 `-b` 参数是以二进制形式打开文件:
起始字节:
Screen_Shot_2016-01-28_at_21.11_.50_.jpg

结束字节:
Screen_Shot_2016-01-28_at_21.11_.29_.jpg

 
具体解决办法我也没有,我没遇到过这个问题。Google 搜来的这个两个链接或许会有帮助:12
 
( ***本内容仅授权给 CaffeCN 社区( caffecn.cn )使用,如需转载须注明出处。*** )

要回复问题请先登录注册