Created
November 6, 2017 07:34
-
-
Save dudu159632/139c90f26dd6e3a38e99edb2a51a3187 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "ZF" | |
layer { | |
name: 'data' | |
type: 'Python' | |
top: 'data' | |
top: 'rois' | |
top: 'labels' | |
top: 'bbox_targets' | |
top: 'bbox_inside_weights' | |
top: 'bbox_outside_weights' | |
python_param { | |
module: 'roi_data_layer.layer' | |
layer: 'RoIDataLayer' | |
param_str: "'num_classes': 21" | |
} | |
} | |
#========= conv1-conv5 ============ | |
layer { | |
name: "conv1" | |
type: "Convolution" | |
bottom: "data" | |
top: "conv1" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 96 | |
kernel_size: 7 | |
pad: 3 | |
stride: 2 | |
} | |
} | |
layer { | |
name: "relu1" | |
type: "ReLU" | |
bottom: "conv1" | |
top: "conv1" | |
} | |
layer { | |
name: "norm1" | |
type: "LRN" | |
bottom: "conv1" | |
top: "norm1" | |
lrn_param { | |
local_size: 3 | |
alpha: 0.00005 | |
beta: 0.75 | |
norm_region: WITHIN_CHANNEL | |
engine: CAFFE | |
} | |
} | |
layer { | |
name: "pool1" | |
type: "Pooling" | |
bottom: "norm1" | |
top: "pool1" | |
pooling_param { | |
kernel_size: 3 | |
stride: 2 | |
pad: 1 | |
pool: MAX | |
} | |
} | |
layer { | |
name: "conv2" | |
type: "Convolution" | |
bottom: "pool1" | |
top: "conv2" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 256 | |
kernel_size: 5 | |
pad: 2 | |
stride: 2 | |
} | |
} | |
layer { | |
name: "relu2" | |
type: "ReLU" | |
bottom: "conv2" | |
top: "conv2" | |
} | |
layer { | |
name: "norm2" | |
type: "LRN" | |
bottom: "conv2" | |
top: "norm2" | |
lrn_param { | |
local_size: 3 | |
alpha: 0.00005 | |
beta: 0.75 | |
norm_region: WITHIN_CHANNEL | |
engine: CAFFE | |
} | |
} | |
layer { | |
name: "pool2" | |
type: "Pooling" | |
bottom: "norm2" | |
top: "pool2" | |
pooling_param { | |
kernel_size: 3 | |
stride: 2 | |
pad: 1 | |
pool: MAX | |
} | |
} | |
layer { | |
name: "conv3" | |
type: "Convolution" | |
bottom: "pool2" | |
top: "conv3" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 384 | |
kernel_size: 3 | |
pad: 1 | |
stride: 1 | |
} | |
} | |
layer { | |
name: "relu3" | |
type: "ReLU" | |
bottom: "conv3" | |
top: "conv3" | |
} | |
layer { | |
name: "conv4" | |
type: "Convolution" | |
bottom: "conv3" | |
top: "conv4" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 384 | |
kernel_size: 3 | |
pad: 1 | |
stride: 1 | |
} | |
} | |
layer { | |
name: "relu4" | |
type: "ReLU" | |
bottom: "conv4" | |
top: "conv4" | |
} | |
layer { | |
name: "conv5" | |
type: "Convolution" | |
bottom: "conv4" | |
top: "conv5" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 256 | |
kernel_size: 3 | |
pad: 1 | |
stride: 1 | |
} | |
} | |
layer { | |
name: "relu5" | |
type: "ReLU" | |
bottom: "conv5" | |
top: "conv5" | |
} | |
#========= RCNN ============ | |
layer { | |
name: "roi_pool_conv5" | |
type: "ROIPooling" | |
bottom: "conv5" | |
bottom: "rois" | |
top: "roi_pool_conv5" | |
roi_pooling_param { | |
pooled_w: 6 | |
pooled_h: 6 | |
spatial_scale: 0.0625 # 1/16 | |
} | |
} | |
layer { | |
name: "fc6" | |
type: "InnerProduct" | |
bottom: "roi_pool_conv5" | |
top: "fc6" | |
param { lr_mult: 1.0 } | |
param { lr_mult: 2.0 } | |
inner_product_param { | |
num_output: 4096 | |
} | |
} | |
layer { | |
name: "relu6" | |
type: "ReLU" | |
bottom: "fc6" | |
top: "fc6" | |
} | |
layer { | |
name: "drop6" | |
type: "Dropout" | |
bottom: "fc6" | |
top: "fc6" | |
dropout_param { | |
dropout_ratio: 0.5 | |
scale_train: false | |
} | |
} | |
layer { | |
name: "fc7" | |
type: "InnerProduct" | |
bottom: "fc6" | |
top: "fc7" | |
param { lr_mult: 1.0 } | |
param { lr_mult: 2.0 } | |
inner_product_param { | |
num_output: 4096 | |
} | |
} | |
layer { | |
name: "relu7" | |
type: "ReLU" | |
bottom: "fc7" | |
top: "fc7" | |
} | |
layer { | |
name: "drop7" | |
type: "Dropout" | |
bottom: "fc7" | |
top: "fc7" | |
dropout_param { | |
dropout_ratio: 0.5 | |
scale_train: false | |
} | |
} | |
layer { | |
name: "cls_score" | |
type: "InnerProduct" | |
bottom: "fc7" | |
top: "cls_score" | |
param { lr_mult: 1.0 } | |
param { lr_mult: 2.0 } | |
inner_product_param { | |
num_output: 21 | |
weight_filler { | |
type: "gaussian" | |
std: 0.01 | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "bbox_pred" | |
type: "InnerProduct" | |
bottom: "fc7" | |
top: "bbox_pred" | |
param { lr_mult: 1.0 } | |
param { lr_mult: 2.0 } | |
inner_product_param { | |
num_output: 84 | |
weight_filler { | |
type: "gaussian" | |
std: 0.001 | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "loss_cls" | |
type: "SoftmaxWithLoss" | |
bottom: "cls_score" | |
bottom: "labels" | |
propagate_down: 1 | |
propagate_down: 0 | |
top: "cls_loss" | |
loss_weight: 1 | |
loss_param { | |
ignore_label: -1 | |
normalize: true | |
} | |
} | |
layer { | |
name: "loss_bbox" | |
type: "SmoothL1Loss" | |
bottom: "bbox_pred" | |
bottom: "bbox_targets" | |
bottom: "bbox_inside_weights" | |
bottom: "bbox_outside_weights" | |
top: "bbox_loss" | |
loss_weight: 1 | |
} | |
#========= RPN ============ | |
# Dummy layers so that initial parameters are saved into the output net | |
layer { | |
name: "rpn_conv1" | |
type: "Convolution" | |
bottom: "conv5" | |
top: "rpn_conv1" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 256 | |
kernel_size: 3 pad: 1 stride: 1 | |
weight_filler { type: "gaussian" std: 0.01 } | |
bias_filler { type: "constant" value: 0 } | |
} | |
} | |
layer { | |
name: "rpn_relu1" | |
type: "ReLU" | |
bottom: "rpn_conv1" | |
top: "rpn_conv1" | |
} | |
layer { | |
name: "rpn_cls_score" | |
type: "Convolution" | |
bottom: "rpn_conv1" | |
top: "rpn_cls_score" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 18 # 2(bg/fg) * 9(anchors) | |
kernel_size: 1 pad: 0 stride: 1 | |
weight_filler { type: "gaussian" std: 0.01 } | |
bias_filler { type: "constant" value: 0 } | |
} | |
} | |
layer { | |
name: "rpn_bbox_pred" | |
type: "Convolution" | |
bottom: "rpn_conv1" | |
top: "rpn_bbox_pred" | |
param { lr_mult: 0 decay_mult: 0 } | |
param { lr_mult: 0 decay_mult: 0 } | |
convolution_param { | |
num_output: 36 # 4 * 9(anchors) | |
kernel_size: 1 pad: 0 stride: 1 | |
weight_filler { type: "gaussian" std: 0.01 } | |
bias_filler { type: "constant" value: 0 } | |
} | |
} | |
layer { | |
name: "silence_rpn_cls_score" | |
type: "Silence" | |
bottom: "rpn_cls_score" | |
} | |
layer { | |
name: "silence_rpn_bbox_pred" | |
type: "Silence" | |
bottom: "rpn_bbox_pred" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment