Faster RCNN 添加 ROIPoolingLayer 和SmoothL1LossLayer
来源:互联网 发布:淘宝上的息肌丸 编辑:程序博客网 时间:2024/06/07 06:29
想要在现有的caffe版本添加ROIPoolingLayer 和SmoothL1LossLayer,首先到这里https://github.com/rbgirshick/caffe-fast-rcnn可以找到他们的定义。caffe添加layer的详细方法在这里可以看到https://github.com/BVLC/caffe/wiki/,然后我们就可以开始啦!!
1.ROIPoolingLayer 和SmoothL1LossLayer的声明与实现:
声明:caffe_root/include/caffe/fast_rcnn_layers.hpp
实现:caffe_root/src/caffe/layers/roi_pooling_layer.cpp
caffe_root/src/caffe/layers/roi_pooling_layer.cu
caffe_root/src/caffe/layers/smooth_L1_loss_layer.cpp
caffe_root/src/caffe/layers/smooth_L1_loss_layer.cu
2.ROIPoolingLayer 和SmoothL1LossLayer的测试:
caffe_root/src/caffe/test/test_roi_pooling_layer.cpp
caffe_root/src/caffe/test/test_smooth_L1_loss_layer.cpp
3.注册
caffe_root/src/caffe/proto/caffe.proto添加
optional ROIPoolingParameter roi_pooling_param = 8266711;
// Message that stores parameters used by ROIPoolingLayer
message ROIPoolingParameter {
// Pad, kernel size, and stride are all given as a single value for equal
// dimensions in height and width or as Y, X pairs.
optional uint32 pooled_h = 1 [default = 0]; // The pooled output height
optional uint32 pooled_w = 2 [default = 0]; // The pooled output width
// Multiplicative spatial scale factor to translate ROI coords from their
// input scale to the scale used when pooling
optional float spatial_scale = 3 [default = 1];
}
optional SmoothL1LossParameter smooth_l1_loss_param = 8266712;
message SmoothL1LossParameter {
// SmoothL1Loss(x) =
// 0.5 * (sigma * x) ** 2 -- if x < 1.0 / sigma / sigma
// |x| - 0.5 / sigma / sigma -- otherwise
optional float sigma = 1 [default = 1];
}
然后就大功告成了,重新编译caffe吧。
- Faster RCNN 添加 ROIPoolingLayer 和SmoothL1LossLayer
- Faster RCNN 添加 ROIPoolingLayer 和SmoothL1LossLayer
- Faster R-CNN是如何添加ROIPoolingLayer和SmoothL1LossLayer的?
- FAST-RCNN 和 Faster-RCNN
- faster rcnn的源码理解(一)SmoothL1LossLayer论文与代码的结合理解
- faster rcnn的源码理解(一)SmoothL1LossLayer论文与代码的结合理解
- rcnn、fast-rcnn和faster-rcnn
- SqueezeNet和Faster RCNN结合
- Faster-RCNN 和RPN详解
- Faster rcnn
- Faster-rcnn
- Faster rcnn
- Faster-Rcnn
- faster-rcnn
- faster-RCNN
- Faster-RCNN
- Faster-rcnn
- faster-rcnn
- Python特性、属性以及私有化
- Python & Shell:一句话的优雅
- 类模板 函数指针 function函数 bind,线程池 lambda函数的使用
- 连接池基础
- 常用的linux命令-- 文本搜索、编辑(grep、sed、awd)
- Faster RCNN 添加 ROIPoolingLayer 和SmoothL1LossLayer
- nginx修改配置文件
- Matlab奇技淫巧
- .NET中那些所谓的新语法之二:匿名类、匿名方法与扩展方法
- android获取video uri的方法
- 树的定义及术语
- 安卓手机如何下载YouTube视频
- linux配置开机启动脚本的文件
- static关键字