caffe ssd 在windows上的编译过程

来源:互联网 发布:淘宝双11店铺活动方图 编辑:程序博客网 时间:2024/05/01 18:09

1. 下这个:

https://github.com/conner99/caffe

选择ssd-microsoft 分支

2. 复制配置文件CommonSettings.props.example为CommonSettings.props,按需修改对应的地方,参照caffe-windows的配置


错误解决:

错误1:GLOG_NO_ABBREVIATED_SEVERITIES

解决:在工程加上预编译宏GLOG_NO_ABBREVIATED_SEVERITIES
C/C++   -->  预处理器   -->   预处理器定义   -->  加上GLOG_NO_ABBREVIATED_SEVERITIES


错误2:opencv 问题

解决:在nuget里把opencv卸载,然后重新搜索opencv2.4.10进行安装


错误3:找不到".\caffe\3rdparty\hungarian.h"文件

解决:在路径.\caffe-master\include\caffe\3rdparty\下添加hungarian.h文件。编译项目,报错:找不到".\src\caffe\3rdparty\hungarian.cpp"文件,在路径.\caffe-master\src\caffe\3rdparty\下添加hungarian.cpp文件

在这里找这个文件,链接:http://pan.baidu.com/s/1mhYuf7y 密码:3jp2


错误4:expected an identifier in caffe.pb.h 

解决:修改bbox_util.cu,注释掉所有带thrust的语句

修改detection_output_layer.cu和detection_output_layer.cpp文件,注释掉所有regex和rv的语句
 //boost::regex exp("\"(null|true|false|-?[0-9]+(\\.[0-9]+)?)\"");

//std::string rv = boost::regex_replace(ss.str(), exp, "$1");  
//outfile << rv.substr(rv.find("["), rv.rfind("]") - rv.find("["))  
//    << std::endl << "]" << std::endl; 

修改detection_output_layer.hpp,注释#include“boost/regex.hpp”
//#include <boost/regex.hpp>  


错误5:成功编译python接口后,import caffe报错 ImportError: No module named caffe

解决:将debug目录下生成的python/caffe目录复制到Anaconda下的Lib\site-packages中即可(针对用的是Anaconda安装的python)





1 0
原创粉丝点击