目标检测,windows 下跑 SSD: Single Shot MultiBox Detector
来源:互联网 发布:2015药典 凡例平行数据 编辑:程序博客网 时间:2024/06/05 19:56
一,方法:微软caffe + 作者ssd版本的caffe 合并
1. 下载微软的caffe: https://github.com/Microsoft/caffe 。 下面简称caffe-microsoft
2. 下载作者ssd版本的caffe: https://github.com/weiliu89/caffe/tree/ssd 。 下面简称caffe-ssd
(注意作者的caffe有一个分支专门是ssd的)
二, 复制caffe-ssd下的部分文件到caffe-microsoft
1. 复制caffe-ssd下include、src、tools 文件夹,覆盖掉caffe-microsoft下面的文件夹。
三,打开caffe-microsoft 的Caffe.sln
1. caffe-microsoft\windows 下 复制一份CommonSettings.props.example到该路径下,并修改名字为CommonSettings.props。
2. 记事本打开CommonSettings.props 进行配置。(此步略,网上找个配置微软的caffe的教程,很多。根据自己需要配置:cpu还是gpu、支持还是不支持cudnn、需不需要matlab和python接口)
3. 用vs2013 打开Caffe.sln, 移出掉libcaffe项目中的cu、src、include文件下的子文件夹下的所有文件,再重新添加第二步提到的复制过来的ssd的源代码。
layers、solvers、util这样分好,看着清楚。(添加好后可以重启vs)
四,修改部分代码,编译libcaffe.lib(只针对gpu版本,cpu没配置过,应该差不多)
1. detection_output_layer.hpp 中注释掉 #include <boost/regex.hpp>
2. detection_output_layer.cpp 和 detection_output_layer.cu中注释掉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;3. bbox_util.cpp 中 将snprintf 换成 _snprintf(两个处)。
bbox.cu 中注释掉 三个地方
1. //#include "thrust/functional.h"2. //#include "thrust/sort.h"3. // thrust::sort_by_key(&confidences[0], &confidences[0] + num_remain, &idx[0], // thrust::greater<Dtype>());
4. common.cpp 中 改两处:
① 开头添加#if defined(_MSC_VER)#include <process.h>#define getpid() _getpid()#endif
::google::InstallFailureSignalHandler();改成#if !defined(_MSC_VER) ::google::InstallFailureSignalHandler();#endif
5. hdf5.cpp 和 signal_handler.cpp 换成微软版本的signal_handler.cpp。
五, 切换到Realse, 编译生成libcaffe
- 目标检测,windows 下跑 SSD: Single Shot MultiBox Detector
- 目标检测--SSD: Single Shot MultiBox Detector
- [目标检测]SSD: Single Shot MultiBox Detector
- 使用Windows Caffe 建立Qt工程 运行SSD(Single Shot MultiBox Detector)目标检测算法
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- SSD: Single Shot Multibox Detector
- SSD Single Shot MultiBox Detector
- SSD: Single Shot MultiBox Detector
- No resource found that matches the given name '@style/Widget.AppCompat.Base.ActionBar'.
- Xamarin.iOS-UIImagePickerController调用相机和获取相册列表【控件篇】
- ZCMU—1053
- Android-Java抓取网络图片上传七牛云全纪录
- iOS-Core-Animation-Advanced-Techniques-(一)图层树
- 目标检测,windows 下跑 SSD: Single Shot MultiBox Detector
- collectionview 边距 collectionViewCell圆角
- VB ListView控件各种操作详解
- 猴子吃桃的问题
- oracle基础--创建数据库用户
- 怎么取消电脑店U盘PE系统赞助商主页、软件
- 27-复制表的数据到另一张新表
- cocos2d——动作
- easyui textbox动态控制只读效果