Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when using mobilenet as it's backbone, why doesn't the faster rcnn work ? #903

Open
zjz5250 opened this issue May 16, 2019 · 0 comments
Open

Comments

@zjz5250
Copy link

zjz5250 commented May 16, 2019

when i try to train the faster rcnn model with mobilenetv1 as it's backbone,
i found the rpn can find anchor_target correctly,i saved the anchor target imgs,
but the rcnn can not classify the object at all,
every sample was recognized as background。
who can tell me why?
appreciate!
the prototxt as follows:

name: "VGG_ILSVRC_16_layers"
layer {
name: 'input-data'
type: 'Python'
top: 'data'
top: 'im_info'
top: 'gt_boxes'
python_param {
module: 'roi_data_layer.layer'
layer: 'RoIDataLayer'
param_str: "'num_classes': 4"
}
}

layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 32
bias_term: false
pad: 1
kernel_size: 3
stride: 2
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv1/bn"
type: "BatchNorm"
bottom: "conv1"
top: "conv1"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv1/scale"
type: "Scale"
bottom: "conv1"
top: "conv1"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "conv1"
top: "conv1"
}
layer {
name: "conv2_1/dw"
type: "Convolution"
bottom: "conv1"
top: "conv2_1/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 32
bias_term: false
pad: 1
kernel_size: 3
group: 32
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv2_1/dw/bn"
type: "BatchNorm"
bottom: "conv2_1/dw"
top: "conv2_1/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv2_1/dw/scale"
type: "Scale"
bottom: "conv2_1/dw"
top: "conv2_1/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu2_1/dw"
type: "ReLU"
bottom: "conv2_1/dw"
top: "conv2_1/dw"
}
layer {
name: "conv2_1/sep"
type: "Convolution"
bottom: "conv2_1/dw"
top: "conv2_1/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 64
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv2_1/sep/bn"
type: "BatchNorm"
bottom: "conv2_1/sep"
top: "conv2_1/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv2_1/sep/scale"
type: "Scale"
bottom: "conv2_1/sep"
top: "conv2_1/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu2_1/sep"
type: "ReLU"
bottom: "conv2_1/sep"
top: "conv2_1/sep"
}
layer {
name: "conv2_2/dw"
type: "Convolution"
bottom: "conv2_1/sep"
top: "conv2_2/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 64
bias_term: false
pad: 1
kernel_size: 3
group: 64
engine: CAFFE
stride: 2
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv2_2/dw/bn"
type: "BatchNorm"
bottom: "conv2_2/dw"
top: "conv2_2/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv2_2/dw/scale"
type: "Scale"
bottom: "conv2_2/dw"
top: "conv2_2/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu2_2/dw"
type: "ReLU"
bottom: "conv2_2/dw"
top: "conv2_2/dw"
}
layer {
name: "conv2_2/sep"
type: "Convolution"
bottom: "conv2_2/dw"
top: "conv2_2/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 128
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv2_2/sep/bn"
type: "BatchNorm"
bottom: "conv2_2/sep"
top: "conv2_2/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv2_2/sep/scale"
type: "Scale"
bottom: "conv2_2/sep"
top: "conv2_2/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu2_2/sep"
type: "ReLU"
bottom: "conv2_2/sep"
top: "conv2_2/sep"
}
layer {
name: "conv3_1/dw"
type: "Convolution"
bottom: "conv2_2/sep"
top: "conv3_1/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 128
bias_term: false
pad: 1
kernel_size: 3
group: 128
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv3_1/dw/bn"
type: "BatchNorm"
bottom: "conv3_1/dw"
top: "conv3_1/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv3_1/dw/scale"
type: "Scale"
bottom: "conv3_1/dw"
top: "conv3_1/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu3_1/dw"
type: "ReLU"
bottom: "conv3_1/dw"
top: "conv3_1/dw"
}
layer {
name: "conv3_1/sep"
type: "Convolution"
bottom: "conv3_1/dw"
top: "conv3_1/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 128
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv3_1/sep/bn"
type: "BatchNorm"
bottom: "conv3_1/sep"
top: "conv3_1/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv3_1/sep/scale"
type: "Scale"
bottom: "conv3_1/sep"
top: "conv3_1/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu3_1/sep"
type: "ReLU"
bottom: "conv3_1/sep"
top: "conv3_1/sep"
}
layer {
name: "conv3_2/dw"
type: "Convolution"
bottom: "conv3_1/sep"
top: "conv3_2/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 128
bias_term: false
pad: 1
kernel_size: 3
group: 128
engine: CAFFE
stride: 2
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv3_2/dw/bn"
type: "BatchNorm"
bottom: "conv3_2/dw"
top: "conv3_2/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv3_2/dw/scale"
type: "Scale"
bottom: "conv3_2/dw"
top: "conv3_2/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu3_2/dw"
type: "ReLU"
bottom: "conv3_2/dw"
top: "conv3_2/dw"
}
layer {
name: "conv3_2/sep"
type: "Convolution"
bottom: "conv3_2/dw"
top: "conv3_2/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 256
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv3_2/sep/bn"
type: "BatchNorm"
bottom: "conv3_2/sep"
top: "conv3_2/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv3_2/sep/scale"
type: "Scale"
bottom: "conv3_2/sep"
top: "conv3_2/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu3_2/sep"
type: "ReLU"
bottom: "conv3_2/sep"
top: "conv3_2/sep"
}
layer {
name: "conv4_1/dw"
type: "Convolution"
bottom: "conv3_2/sep"
top: "conv4_1/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 256
bias_term: false
pad: 1
kernel_size: 3
group: 256
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv4_1/dw/bn"
type: "BatchNorm"
bottom: "conv4_1/dw"
top: "conv4_1/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv4_1/dw/scale"
type: "Scale"
bottom: "conv4_1/dw"
top: "conv4_1/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu4_1/dw"
type: "ReLU"
bottom: "conv4_1/dw"
top: "conv4_1/dw"
}
layer {
name: "conv4_1/sep"
type: "Convolution"
bottom: "conv4_1/dw"
top: "conv4_1/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 256
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv4_1/sep/bn"
type: "BatchNorm"
bottom: "conv4_1/sep"
top: "conv4_1/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv4_1/sep/scale"
type: "Scale"
bottom: "conv4_1/sep"
top: "conv4_1/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu4_1/sep"
type: "ReLU"
bottom: "conv4_1/sep"
top: "conv4_1/sep"
}
layer {
name: "conv4_2/dw"
type: "Convolution"
bottom: "conv4_1/sep"
top: "conv4_2/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 256
bias_term: false
pad: 1
kernel_size: 3
group: 256
engine: CAFFE
stride: 2
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv4_2/dw/bn"
type: "BatchNorm"
bottom: "conv4_2/dw"
top: "conv4_2/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv4_2/dw/scale"
type: "Scale"
bottom: "conv4_2/dw"
top: "conv4_2/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu4_2/dw"
type: "ReLU"
bottom: "conv4_2/dw"
top: "conv4_2/dw"
}
layer {
name: "conv4_2/sep"
type: "Convolution"
bottom: "conv4_2/dw"
top: "conv4_2/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv4_2/sep/bn"
type: "BatchNorm"
bottom: "conv4_2/sep"
top: "conv4_2/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv4_2/sep/scale"
type: "Scale"
bottom: "conv4_2/sep"
top: "conv4_2/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu4_2/sep"
type: "ReLU"
bottom: "conv4_2/sep"
top: "conv4_2/sep"
}
layer {
name: "conv5_1/dw"
type: "Convolution"
bottom: "conv4_2/sep"
top: "conv5_1/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 1
kernel_size: 3
group: 512
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_1/dw/bn"
type: "BatchNorm"
bottom: "conv5_1/dw"
top: "conv5_1/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_1/dw/scale"
type: "Scale"
bottom: "conv5_1/dw"
top: "conv5_1/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_1/dw"
type: "ReLU"
bottom: "conv5_1/dw"
top: "conv5_1/dw"
}
layer {
name: "conv5_1/sep"
type: "Convolution"
bottom: "conv5_1/dw"
top: "conv5_1/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_1/sep/bn"
type: "BatchNorm"
bottom: "conv5_1/sep"
top: "conv5_1/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_1/sep/scale"
type: "Scale"
bottom: "conv5_1/sep"
top: "conv5_1/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_1/sep"
type: "ReLU"
bottom: "conv5_1/sep"
top: "conv5_1/sep"
}
layer {
name: "conv5_2/dw"
type: "Convolution"
bottom: "conv5_1/sep"
top: "conv5_2/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 1
kernel_size: 3
group: 512
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_2/dw/bn"
type: "BatchNorm"
bottom: "conv5_2/dw"
top: "conv5_2/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_2/dw/scale"
type: "Scale"
bottom: "conv5_2/dw"
top: "conv5_2/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_2/dw"
type: "ReLU"
bottom: "conv5_2/dw"
top: "conv5_2/dw"
}
layer {
name: "conv5_2/sep"
type: "Convolution"
bottom: "conv5_2/dw"
top: "conv5_2/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_2/sep/bn"
type: "BatchNorm"
bottom: "conv5_2/sep"
top: "conv5_2/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_2/sep/scale"
type: "Scale"
bottom: "conv5_2/sep"
top: "conv5_2/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_2/sep"
type: "ReLU"
bottom: "conv5_2/sep"
top: "conv5_2/sep"
}
layer {
name: "conv5_3/dw"
type: "Convolution"
bottom: "conv5_2/sep"
top: "conv5_3/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 1
kernel_size: 3
group: 512
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_3/dw/bn"
type: "BatchNorm"
bottom: "conv5_3/dw"
top: "conv5_3/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_3/dw/scale"
type: "Scale"
bottom: "conv5_3/dw"
top: "conv5_3/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_3/dw"
type: "ReLU"
bottom: "conv5_3/dw"
top: "conv5_3/dw"
}
layer {
name: "conv5_3/sep"
type: "Convolution"
bottom: "conv5_3/dw"
top: "conv5_3/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_3/sep/bn"
type: "BatchNorm"
bottom: "conv5_3/sep"
top: "conv5_3/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_3/sep/scale"
type: "Scale"
bottom: "conv5_3/sep"
top: "conv5_3/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_3/sep"
type: "ReLU"
bottom: "conv5_3/sep"
top: "conv5_3/sep"
}
layer {
name: "conv5_4/dw"
type: "Convolution"
bottom: "conv5_3/sep"
top: "conv5_4/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 1
kernel_size: 3
group: 512
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_4/dw/bn"
type: "BatchNorm"
bottom: "conv5_4/dw"
top: "conv5_4/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_4/dw/scale"
type: "Scale"
bottom: "conv5_4/dw"
top: "conv5_4/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_4/dw"
type: "ReLU"
bottom: "conv5_4/dw"
top: "conv5_4/dw"
}
layer {
name: "conv5_4/sep"
type: "Convolution"
bottom: "conv5_4/dw"
top: "conv5_4/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_4/sep/bn"
type: "BatchNorm"
bottom: "conv5_4/sep"
top: "conv5_4/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_4/sep/scale"
type: "Scale"
bottom: "conv5_4/sep"
top: "conv5_4/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_4/sep"
type: "ReLU"
bottom: "conv5_4/sep"
top: "conv5_4/sep"
}
layer {
name: "conv5_5/dw"
type: "Convolution"
bottom: "conv5_4/sep"
top: "conv5_5/dw"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 1
kernel_size: 3
group: 512
engine: CAFFE
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_5/dw/bn"
type: "BatchNorm"
bottom: "conv5_5/dw"
top: "conv5_5/dw"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_5/dw/scale"
type: "Scale"
bottom: "conv5_5/dw"
top: "conv5_5/dw"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_5/dw"
type: "ReLU"
bottom: "conv5_5/dw"
top: "conv5_5/dw"
}
layer {
name: "conv5_5/sep"
type: "Convolution"
bottom: "conv5_5/dw"
top: "conv5_5/sep"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 512
bias_term: false
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv5_5/sep/bn"
type: "BatchNorm"
bottom: "conv5_5/sep"
top: "conv5_5/sep"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
batch_norm_param {
use_global_stats: false
eps: 1e-5
}
}
layer {
name: "conv5_5/sep/scale"
type: "Scale"
bottom: "conv5_5/sep"
top: "conv5_5/sep"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "relu5_5/sep"
type: "ReLU"
bottom: "conv5_5/sep"
top: "conv5_5/sep"
}

#========= RPN ============

layer {
name: "rpn_conv/3x3"
type: "Convolution"
#bottom: "conv5_2/expand"
bottom: "conv5_5/sep"
top: "rpn/output"
param { lr_mult: 1.0 }
param { lr_mult: 2.0 }
convolution_param {
num_output: 512
kernel_size: 3 pad: 1 stride: 1
weight_filler { type: "gaussian" std: 0.01 }
bias_filler { type: "constant" value: 0 }
}
}
layer {
name: "rpn_relu/3x3"
type: "ReLU"
bottom: "rpn/output"
top: "rpn/output"
}

layer {
name: "rpn_cls_score"
type: "Convolution"
bottom: "rpn/output"
top: "rpn_cls_score"
param { lr_mult: 1.0 }
param { lr_mult: 2.0 }
convolution_param {
num_output: 54 # 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/output"
top: "rpn_bbox_pred"
param { lr_mult: 1.0 }
param { lr_mult: 2.0 }
convolution_param {
num_output: 108 # 4 * 9(anchors)
kernel_size: 1 pad: 0 stride: 1
weight_filler { type: "gaussian" std: 0.01 }
bias_filler { type: "constant" value: 0 }
}
}

layer {
bottom: "rpn_cls_score"
top: "rpn_cls_score_reshape"
name: "rpn_cls_score_reshape"
type: "Reshape"
reshape_param { shape { dim: 0 dim: 2 dim: -1 dim: 0 } }
}

layer {
name: 'rpn-data'
type: 'Python'
bottom: 'rpn_cls_score'
bottom: 'gt_boxes'
bottom: 'im_info'
bottom: 'data'
top: 'rpn_labels'
top: 'rpn_bbox_targets'
top: 'rpn_bbox_inside_weights'
top: 'rpn_bbox_outside_weights'
python_param {
module: 'rpn.anchor_target_layer'
layer: 'AnchorTargetLayer'
param_str: "'feat_stride': 16"
}
}

layer {
name: "rpn_loss_cls"
type: "SoftmaxWithLoss"
bottom: "rpn_cls_score_reshape"
bottom: "rpn_labels"
propagate_down: 1
propagate_down: 0
top: "rpn_cls_loss"
loss_weight: 1
loss_param {
ignore_label: -1
normalize: true
}
}

layer {
name: "rpn_loss_bbox"
type: "SmoothL1Loss"
bottom: "rpn_bbox_pred"
bottom: "rpn_bbox_targets"
bottom: 'rpn_bbox_inside_weights'
bottom: 'rpn_bbox_outside_weights'
top: "rpn_loss_bbox"
loss_weight: 1
smooth_l1_loss_param { sigma: 3.0 }
}

#========= RoI Proposal ============

layer {
name: "rpn_cls_prob"
type: "Softmax"
bottom: "rpn_cls_score_reshape"
top: "rpn_cls_prob"
}

layer {
name: 'rpn_cls_prob_reshape'
type: 'Reshape'
bottom: 'rpn_cls_prob'
top: 'rpn_cls_prob_reshape'
reshape_param { shape { dim: 0 dim: 54 dim: -1 dim: 0 } }
}

layer {
name: 'proposal'
type: 'Python'
bottom: 'rpn_cls_prob_reshape'
bottom: 'rpn_bbox_pred'
bottom: 'im_info'
top: 'rpn_rois'

top: 'rpn_scores'

python_param {
module: 'rpn.proposal_layer'
layer: 'ProposalLayer'
param_str: "'feat_stride': 16"
}
}

#layer {

name: 'debug-data'

type: 'Python'

bottom: 'data'

bottom: 'rpn_rois'

bottom: 'rpn_scores'

python_param {

module: 'rpn.debug_layer'

layer: 'RPNDebugLayer'

}

#}

layer {
name: 'roi-data'
type: 'Python'
bottom: 'rpn_rois'
bottom: 'gt_boxes'
top: 'rois'
top: 'labels'
top: 'bbox_targets'
top: 'bbox_inside_weights'
top: 'bbox_outside_weights'
python_param {
module: 'rpn.proposal_target_layer'
layer: 'ProposalTargetLayer'
param_str: "'num_classes': 4" #21
}
}

#========= RCNN ============

layer {
name: "roi_pool5"
type: "ROIPooling"
bottom: "conv5_5/sep"
bottom: "rois"
top: "pool5"
roi_pooling_param {
pooled_w: 7
pooled_h: 7
spatial_scale: 0.0625 # 1/16
}
}
layer {
name: "fc6"
type: "InnerProduct"
bottom: "pool5"
top: "fc6"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
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
}
}
layer {
name: "fc7"
type: "InnerProduct"
bottom: "fc6"
top: "fc7"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
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
}
}
layer {
name: "cls_score"
type: "InnerProduct"
bottom: "fc7"
top: "cls_score"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 4 #21
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}

layer {
name: "accuracy"
type: "Accuracy"
bottom: "cls_score"
bottom: "labels"
top: "accuracy"
include {
phase: TRAIN
}
}

layer {
type: 'Python'
name: 'py_accuracy'
top: 'py_accuracy'
bottom: 'cls_score'
bottom: 'labels'
python_param {
# the module name -- usually the filename -- that needs to be in $PYTHONPATH
module: 'rpn.python_confmat'
# the layer name -- the class name in the module
layer: 'PythonConfMat'
param_str: '{"test_iter":20}'
}
include {
phase: TRAIN
}
}

layer {
name: "bbox_pred"
type: "InnerProduct"
bottom: "fc7"
top: "bbox_pred"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 16 #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: "loss_cls"
loss_weight: 1
}
layer {
name: "loss_bbox"
type: "SmoothL1Loss"
bottom: "bbox_pred"
bottom: "bbox_targets"
bottom: "bbox_inside_weights"
bottom: "bbox_outside_weights"
top: "loss_bbox"
loss_weight: 1
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant