weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.68k forks source link

how to use ssd_detect.cpp in eclipse #399

Open michael5lin opened 7 years ago

michael5lin commented 7 years ago

@weiliu89 Im very sorry to let my tiny problem to bother you,but this puzzle have been troubling me for nearly 2weeks.The prbo is not about algorithm but related to C++program.AS a isolated student to do this area with no one can help me here.The prbo is not about algorithm but related to C++program.

the problem is:

const string& model_file = "/home/.../SSD_300x300/deploy.prototxt";

const string& weights_file = "/home/.../VGG_VOC0712_SSD_300x300_iter_120000.caffemodel";

const string& out_file = "/home/.../output.txt";

...

std::ifstream infile("/home/.../test.txt");//test.txt contain the Path of test img

comment all the #ifdef code line

I add these path to the ssd_detect.cpp, in order 22 to use eclipse to run the .cpp to get the result.txt not just use the command line in terminal.

BUT,after build when i run the code eclipse said :

ssd_detect: Do detection using SSD mode. Usage: ssd_detect [FLAGS] model_file weights_file list_file

No modules matched: use -help

im so confused about this,what im missing or if there exist a mistakes? This prob is so tricky for me as a new beginner. Truly hope you can help me here when you are free. Best wish (OS:ubuntu16.04 IDE:eclispe )

weiliu89 commented 7 years ago

From the help:

ssd_detect [FLAGS] model_file weights_file list_file

It means model_file, weights_file and list_file are required parameters. You cannot ignore it.

If you really don't want to provide the required parameters, you could consider remove these lines.

And why not running this in terminal?

zhohuiluo commented 7 years ago

I have a trouble on running the ssd_detection.cpp i run it in the terminal : g++ ssd_detect.cpp -I /home/luo/caffe-ssd/include/ -I /usr/local/cuda-8.0/include/ while it filed ,the error: caffe/proto/caffe.pb.h: can't find it but in the proto fold ,it does't have the caffe.pb.h whether I run the ssd_detection.cpp in a wrong way ? or i should make all again? I am also a new beginner with no one to help ,I will be grateful if you could answer my question

sangthian commented 7 years ago

you can refer this blog: http://blog.csdn.net/jesse_mx/article/details/65631763