Faster RCNN 添加 ROIPoolingLayer 和SmoothL1LossLayer
来源:互联网 发布:配置交换机端口类型 编辑:程序博客网 时间:2024/06/10 01:31
想要在现有的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
- 动态规划(记忆化搜索)
- framework not found Bolts for architecture x86_64
- 指针的大小
- 不用除法求一个数组中除自己外的元素乘积
- 坚持#第21天~学好专业知识!
- Faster RCNN 添加 ROIPoolingLayer 和SmoothL1LossLayer
- activity详解一
- hdfs的一些命令
- 几种常见模式识别算法整理和总结
- TOJ 2867.Picking Problem(最大区间调度)
- 杭电2002 2003/2001 2003
- break、continue、return的用法
- 第一次面试(厦门西联电子)
- Linux文件和目录的粘滞位的使用