使用SSD目标检测c++接口编译问题解决记录

本来SSD做测试的Python接口用起来也是比较方便的,但是如果部署集成的话,肯定要用c++环境,于是动手鼓捣了一下。

编译用的cmake,写的CMakeList.txt,期间碰到一些小问题,简单记录一下问题以及解决方法。

当然前提是你本地的caffe环境没啥问题。各种依赖都安好了。。

1.error: ‘AnnotatedDatum’ has not been declared    AnnotatedDatum* anno_datum);

/home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:192:40: error: ‘AnnotatedDatum_AnnotationType’ does not name a type const std::string& encoding, const AnnotatedDatum_AnnotationType type, ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:194:5: error: ‘AnnotatedDatum’ has not been declared AnnotatedDatum* anno_datum); ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:199:11: error: ‘AnnotatedDatum_AnnotationType’ does not name a type const AnnotatedDatum_AnnotationType type, const string& labeltype, ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:200:49: error: ‘AnnotatedDatum’ has not been declared const std::map<string, int>& name_to_label, AnnotatedDatum* anno_datum) { ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:208:5: error: ‘AnnotatedDatum’ has not been declared AnnotatedDatum* anno_datum); ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:212:5: error: ‘AnnotatedDatum’ has not been declared AnnotatedDatum* anno_datum); ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:215:22: error: ‘AnnotatedDatum’ has not been declared const int width, AnnotatedDatum* anno_datum); ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:218:30: error: ‘LabelMap’ has not been declared const string& delimiter, LabelMap* map); ^ /home/jiawenhao/ssd/caffe/include/caffe/util/io.hpp:221:32: error: ‘LabelMap’ has not been declared bool include_background, LabelMap* map) { ^

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wppdjs.html