Open beiliubei opened 7 years ago
I encountered this issue too. And then found the reason. If you refer to demo.py, you will find the image needs to do such preprocessing:
so, you should change ssd_detect.cpp codes to set mean value (from command parameter) and do scaling correctly like below:
cv::Mat sample_normalized; cv::subtract(samplefloat, mean, sample_normalized);
+sample_normalized *= 0.007843;
/* This operation will write the separate BGR planes directly to the
@oceanheart99 , Thanks for your help. I also encountered the same issue. But why do you split sample_normalized into *input_channels? There is " img = img.transpose((2, 0, 1))" in the demo.py, how can it be implemented in C++? Thanks!
@firefox1031 The above change is based on caffe/example/ssd/ssd_detect.cpp. If you use demo.py, there is no such issue.
hi @oceanheart99 I can't download the caffemodel file and the prototxt file from googledrive .If it is convenient, could you share your download files, thanks very much ! my email is 1120651074@qq.com thanks again.
use examples/ssd/ssd_detect
and then get follow result
detection_output_layer.cpp:282] Couldn't find any detections
any difference?