Comments (6)
Please refer to official Caffe website (https://github.com/BVLC/caffe) for more information about adding new layers. Note that if you want to add the auto_crop_layer by yourself, some related layers should be modified, not only the new layer. Besides, the auto_crop_layer can be replaced by the standard crop_layer in Caffe by specifying a proper offset value.
from rcf.
Could you tell me what other layer I need to modify?
Thanks
from rcf.
Could you open a trainval.prototxt with standard crop operation?
from rcf.
@xhzcyc The network with the standard crop layer:
input: "data"
input_shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
layer { name: "conv1_1" type: "Convolution" bottom: "data" top: "conv1_1"
convolution_param { num_output: 64 pad: 1 kernel_size: 3 } }
layer { name: "relu1_1" type: "ReLU" bottom: "conv1_1" top: "conv1_1" }
layer { name: "conv1_2" type: "Convolution" bottom: "conv1_1" top: "conv1_2"
convolution_param { num_output: 64 pad: 1 kernel_size: 3 } }
layer { name: "relu1_2" type: "ReLU" bottom: "conv1_2" top: "conv1_2" }
layer { name: "pool1" type: "Pooling" bottom: "conv1_2" top: "pool1"
pooling_param { pool: MAX kernel_size: 2 stride: 2 } }
layer { name: "conv2_1" type: "Convolution" bottom: "pool1" top: "conv2_1"
convolution_param { num_output: 128 pad: 1 kernel_size: 3 } }
layer { name: "relu2_1" type: "ReLU" bottom: "conv2_1" top: "conv2_1" }
layer { name: "conv2_2" type: "Convolution" bottom: "conv2_1" top: "conv2_2"
convolution_param { num_output: 128 pad: 1 kernel_size: 3 } }
layer { name: "relu2_2" type: "ReLU" bottom: "conv2_2" top: "conv2_2" }
layer { name: "pool2" type: "Pooling" bottom: "conv2_2" top: "pool2"
pooling_param { pool: MAX kernel_size: 2 stride: 2 } }
layer { name: "conv3_1" type: "Convolution" bottom: "pool2" top: "conv3_1"
convolution_param { num_output: 256 pad: 1 kernel_size: 3 } }
layer { name: "relu3_1" type: "ReLU" bottom: "conv3_1" top: "conv3_1" }
layer { name: "conv3_2" type: "Convolution" bottom: "conv3_1" top: "conv3_2"
convolution_param { num_output: 256 pad: 1 kernel_size: 3 } }
layer { name: "relu3_2" type: "ReLU" bottom: "conv3_2" top: "conv3_2" }
layer { name: "conv3_3" type: "Convolution" bottom: "conv3_2" top: "conv3_3"
convolution_param { num_output: 256 pad: 1 kernel_size: 3 } }
layer { name: "relu3_3" type: "ReLU" bottom: "conv3_3" top: "conv3_3" }
layer { name: "pool3" type: "Pooling" bottom: "conv3_3" top: "pool3"
pooling_param { pool: MAX kernel_size: 2 stride: 2 } }
layer { name: "conv4_1" type: "Convolution" bottom: "pool3" top: "conv4_1"
convolution_param { num_output: 512 pad: 1 kernel_size: 3 } }
layer { name: "relu4_1" type: "ReLU" bottom: "conv4_1" top: "conv4_1" }
layer { name: "conv4_2" type: "Convolution" bottom: "conv4_1" top: "conv4_2"
convolution_param { num_output: 512 pad: 1 kernel_size: 3 } }
layer { name: "relu4_2" type: "ReLU" bottom: "conv4_2" top: "conv4_2" }
layer { name: "conv4_3" type: "Convolution" bottom: "conv4_2" top: "conv4_3"
convolution_param { num_output: 512 pad: 1 kernel_size: 3 } }
layer { name: "relu4_3" type: "ReLU" bottom: "conv4_3" top: "conv4_3" }
layer { name: "pool4" type: "Pooling" bottom: "conv4_3" top: "pool4"
pooling_param { pool: MAX kernel_size: 2 stride: 1 } }
layer { name: "conv5_1" type: "Convolution" bottom: "pool4" top: "conv5_1"
convolution_param { num_output: 512 pad: 2 kernel_size: 3 dilation: 2 } }
layer { name: "relu5_1" type: "ReLU" bottom: "conv5_1" top: "conv5_1" }
layer { name: "conv5_2" type: "Convolution" bottom: "conv5_1" top: "conv5_2"
convolution_param { num_output: 512 pad: 2 kernel_size: 3 dilation: 2 } }
layer { name: "relu5_2" type: "ReLU" bottom: "conv5_2" top: "conv5_2" }
layer { name: "conv5_3" type: "Convolution" bottom: "conv5_2" top: "conv5_3"
convolution_param { num_output: 512 pad: 2 kernel_size: 3 dilation: 2 } }
layer { name: "relu5_3" type: "ReLU" bottom: "conv5_3" top: "conv5_3" }
layer { name: "conv1_1_down" type: "Convolution" bottom: "conv1_1" top: "conv1_1_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv1_2_down" type: "Convolution" bottom: "conv1_2" top: "conv1_2_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "score_fuse1" type: "Eltwise" bottom: "conv1_1_down" bottom: "conv1_2_down"
top: "score_fuse1" eltwise_param { operation: SUM } }
layer { name: "score-dsn1" type: "Convolution" bottom: "score_fuse1" top: "upscore-dsn1"
convolution_param { num_output: 1 kernel_size: 1 } }
layer { name: "sigmoid-dsn1" type: "Sigmoid" bottom: "upscore-dsn1" top: "sigmoid-dsn1"}
layer { name: "conv2_1_down" type: "Convolution" bottom: "conv2_1" top: "conv2_1_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv2_2_down" type: "Convolution" bottom: "conv2_2" top: "conv2_2_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "score_fuse2" type: "Eltwise" bottom: "conv2_1_down" bottom: "conv2_2_down"
top: "score_fuse2" eltwise_param { operation: SUM } }
layer { name: "score-dsn2" type: "Convolution" bottom: "score_fuse2" top: "score-dsn2"
convolution_param { num_output: 1 kernel_size: 1 } }
layer { name: "upsample_2" type: "Deconvolution" bottom: "score-dsn2" top: "score-dsn2-up"
convolution_param { kernel_size: 4 stride: 2 num_output: 1 } }
layer { name: "crop2" type: "Crop" bottom: "score-dsn2-up" bottom: "data" top: "upscore-dsn2"
crop_param { axis: 2 offset: 1 } }
layer { name: "sigmoid-dsn2" type: "Sigmoid" bottom: "upscore-dsn2" top: "sigmoid-dsn2"}
layer { name: "conv3_1_down" type: "Convolution" bottom: "conv3_1" top: "conv3_1_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv3_2_down" type: "Convolution" bottom: "conv3_2" top: "conv3_2_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv3_3_down" type: "Convolution" bottom: "conv3_3" top: "conv3_3_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "score_fuse3" type: "Eltwise" bottom: "conv3_1_down" bottom: "conv3_2_down"
bottom: "conv3_3_down" top: "score_fuse3" eltwise_param { operation: SUM } }
layer { name: "score-dsn3" type: "Convolution" bottom: "score_fuse3" top: "score-dsn3"
convolution_param { num_output: 1 kernel_size: 1 } }
layer { name: "upsample_4" type: "Deconvolution" bottom: "score-dsn3" top: "score-dsn3-up"
convolution_param { kernel_size: 8 stride: 4 num_output: 1 } }
layer { name: "crop3" type: "Crop" bottom: "score-dsn3-up" bottom: "data" top: "upscore-dsn3"
crop_param { axis: 2 offset: 2 } }
layer { name: "sigmoid-dsn3" type: "Sigmoid" bottom: "upscore-dsn3" top: "sigmoid-dsn3"}
layer { name: "conv4_1_down" type: "Convolution" bottom: "conv4_1" top: "conv4_1_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv4_2_down" type: "Convolution" bottom: "conv4_2" top: "conv4_2_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv4_3_down" type: "Convolution" bottom: "conv4_3" top: "conv4_3_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "score_fuse4" type: "Eltwise" bottom: "conv4_1_down" bottom: "conv4_2_down"
bottom: "conv4_3_down" top: "score_fuse4" eltwise_param { operation: SUM } }
layer { name: "score-dsn4" type: "Convolution" bottom: "score_fuse4" top: "score-dsn4"
convolution_param { num_output: 1 kernel_size: 1 } }
layer { name: "upsample_8" type: "Deconvolution" bottom: "score-dsn4" top: "score-dsn4-up"
convolution_param { kernel_size: 16 stride: 8 num_output: 1 } }
layer { name: "crop4" type: "Crop" bottom: "score-dsn4-up" bottom: "data" top: "upscore-dsn4"
crop_param { axis: 2 offset: 4 } }
layer { name: "sigmoid-dsn4" type: "Sigmoid" bottom: "upscore-dsn4" top: "sigmoid-dsn4"}
layer { name: "conv5_1_down" type: "Convolution" bottom: "conv5_1" top: "conv5_1_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv5_2_down" type: "Convolution" bottom: "conv5_2" top: "conv5_2_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "conv5_3_down" type: "Convolution" bottom: "conv5_3" top: "conv5_3_down"
convolution_param { num_output: 21 kernel_size: 1 } }
layer { name: "score_fuse5" type: "Eltwise" bottom: "conv5_1_down" bottom: "conv5_2_down"
bottom: "conv5_3_down" top: "score_fuse5" eltwise_param { operation: SUM } }
layer { name: "score-dsn5" type: "Convolution" bottom: "score_fuse5" top: "score-dsn5"
convolution_param { num_output: 1 kernel_size: 1 } }
layer { name: "upsample_8_5" type: "Deconvolution" bottom: "score-dsn5" top: "score-dsn5-up"
convolution_param { kernel_size: 16 stride: 8 num_output: 1 } }
layer { name: "crop5" type: "Crop" bottom: "score-dsn5-up" bottom: "data" top: "upscore-dsn5"
crop_param { axis: 2 offset: 0 } }
layer { name: "sigmoid-dsn5" type: "Sigmoid" bottom: "upscore-dsn5" top: "sigmoid-dsn5"}
layer { name: "concat" bottom: "upscore-dsn1" bottom: "upscore-dsn2" bottom: "upscore-dsn3"
bottom: "upscore-dsn4" bottom: "upscore-dsn5" top: "concat-upscore" type: "Concat"
concat_param { concat_dim: 1 } }
layer { name: "new-score-weighting" type: "Convolution" bottom: "concat-upscore" top: "upscore-fuse"
convolution_param { num_output: 1 kernel_size: 1 } }
layer { name: "sigmoid-fuse" type: "Sigmoid" bottom: "upscore-fuse" top: "sigmoid-fuse"}
from rcf.
So can I say the main issue in crop_layer is to specify a proper offset value by careful careful manual calculation?
from rcf.
@frankie-yanfeng Yes, you are right!
from rcf.
Related Issues (20)
- How to evaluate the NYUD? HOT 2
- pretrain model无法下载 HOT 1
- 定位公差maxDist HOT 2
- PASCAL VOC边缘集是怎么生成的
- NYUV2数据集获取 HOT 2
- 关于整体分割过程的问题
- 求pytorch版本的预训练ResNet模型
- 求pytorch版本的Resnet预训练模型
- Multicue数据集MaxDist HOT 3
- 关于matlab画精确率-召回率图的问题
- 您好,我想问一下,任意尺寸图片输入后会统一调整为多大? HOT 4
- 数据集 HOT 2
- 输出图片都是黑白的 HOT 4
- 使用pytorch版本跑NYUD数据集时需要更改那些地方的代码呢
- How to plot the curve on Multicue dataset HOT 1
- 关于轮廓细节信息的影响 HOT 2
- 关于multicue数据集的训练 HOT 2
- 关于NYUD-HHA-RGB的结果 HOT 7
- 在自定义数据集上进行evaluation HOT 5
- 我有点无法理解allBench和boundaryBench函数的原理,不知道OIS和ODS是如何计算的
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcf.