caffe icon indicating copy to clipboard operation
caffe copied to clipboard

ssd_detect.bin: "Check failed: num_test_image_ <= names_.size()"

Open gilshm opened this issue 8 years ago • 5 comments

I've been trying to use ssd_detect.bin, but I get this error: detection_output_layer.cpp:98] Check failed: num_test_image_ <= names_.size() (4952 vs. 0)

This is the command line I'm using: ./build/examples/ssd/ssd_detect.bin models/VGGNet/VOC0712/SSD_300x300/deploy.prototxt models/VGGNet/VOC0712/SSD_300x300/VGG_VOC0712_SSD_300x300_iter_120000.caffemodel ./examples/ssd/images.txt

images.txt consists with only one image: ./examples/images/cat.jpg

Can you please advise?

Thanks!

gilshm avatar Feb 17 '17 21:02 gilshm

I found out that if I leave the name_size_file blank in the .prototxt file it runs. Now that I'm thinking about it, I didn't have the name_size_file at the beginning, I just created it without any content in it. What is that file?

gilshm avatar Feb 18 '17 07:02 gilshm

Yes, the problem is with that file. That file contains test image names (without jpg or something, only file name) and their resolution for example: (file name is 001.jpg)

001 640 480

MyVanitar avatar Feb 18 '17 15:02 MyVanitar

@gilshm same problem ,have you found the solution?

albertyou2 avatar May 12 '17 04:05 albertyou2

@VanitarNordic Thank you, worked for me. :+1:

ranjithrajasimha avatar Oct 26 '17 04:10 ranjithrajasimha

@gilshm same problem ,have you found the solution? update the line in ssd_pascal.py :num_test_image = 4952 to your test images num; 这句话指定了测试图片的数量;你的测试集数量一定是大于等于这个数的,如果小于就会报错;

smartadpole avatar May 13 '19 03:05 smartadpole