东方耀AI技术分享
标题:
caffe-ssd网络结构分析(东方耀)
[打印本页]
作者:
东方耀
时间:
2019-9-25 10:48
标题:
caffe-ssd网络结构分析(东方耀)
caffe-ssd网络结构分析(东方耀)
caffe网络在线可视化工具(需要翻墙):
http://ethereon.github.io/netscope/#/editor
层名+输出特征图的shape:data (1, 3, 300, 300)
层名+输出特征图的shape:data_input_0_split_0 (1, 3, 300, 300)
层名+输出特征图的shape:data_input_0_split_1 (1, 3, 300, 300)
层名+输出特征图的shape:data_input_0_split_2 (1, 3, 300, 300)
层名+输出特征图的shape:data_input_0_split_3 (1, 3, 300, 300)
层名+输出特征图的shape:data_input_0_split_4 (1, 3, 300, 300)
层名+输出特征图的shape:data_input_0_split_5 (1, 3, 300, 300)
层名+输出特征图的shape:data_input_0_split_6 (1, 3, 300, 300)
层名+输出特征图的shape:conv1_1 (1, 32, 300, 300)
层名+输出特征图的shape:conv1_2 (1, 32, 300, 300)
层名+输出特征图的shape:pool1 (1, 32, 150, 150)
层名+输出特征图的shape:conv2_1 (1, 64, 150, 150)
层名+输出特征图的shape:conv2_2 (1, 64, 150, 150)
层名+输出特征图的shape:pool2 (1, 64, 75, 75)
层名+输出特征图的shape:conv3_1 (1, 128, 75, 75)
层名+输出特征图的shape:conv3_3 (1, 128, 75, 75)
层名+输出特征图的shape:pool3 (1, 128, 38, 38)
层名+输出特征图的shape:conv4_1 (1, 256, 38, 38)
层名+输出特征图的shape:conv4_3 (1, 256, 38, 38)
层名+输出特征图的shape:conv4_3_relu4_3_0_split_0 (1, 256, 38, 38)
层名+输出特征图的shape:conv4_3_relu4_3_0_split_1 (1, 256, 38, 38)
层名+输出特征图的shape:pool4 (1, 256, 19, 19)
层名+输出特征图的shape:conv5_1 (1, 256, 19, 19)
层名+输出特征图的shape:conv5_3 (1, 256, 19, 19)
层名+输出特征图的shape:conv5_3_relu5_3_0_split_0 (1, 256, 19, 19)
层名+输出特征图的shape:conv5_3_relu5_3_0_split_1 (1, 256, 19, 19)
层名+输出特征图的shape:conv5_3_relu5_3_0_split_2 (1, 256, 19, 19)
层名+输出特征图的shape:conv5_3_relu5_3_0_split_3 (1, 256, 19, 19)
层名+输出特征图的shape:conv6_1 (1, 256, 19, 19)
层名+输出特征图的shape:conv6_2 (1, 512, 10, 10)
层名+输出特征图的shape:conv6_2_conv6_2_relu_0_split_0 (1, 512, 10, 10)
层名+输出特征图的shape:conv6_2_conv6_2_relu_0_split_1 (1, 512, 10, 10)
层名+输出特征图的shape:conv6_2_conv6_2_relu_0_split_2 (1, 512, 10, 10)
层名+输出特征图的shape:conv6_2_conv6_2_relu_0_split_3 (1, 512, 10, 10)
层名+输出特征图的shape:conv7_1 (1, 128, 10, 10)
层名+输出特征图的shape:conv7_2 (1, 256, 5, 5)
层名+输出特征图的shape:conv7_2_conv7_2_relu_0_split_0 (1, 256, 5, 5)
层名+输出特征图的shape:conv7_2_conv7_2_relu_0_split_1 (1, 256, 5, 5)
层名+输出特征图的shape:conv7_2_conv7_2_relu_0_split_2 (1, 256, 5, 5)
层名+输出特征图的shape:conv7_2_conv7_2_relu_0_split_3 (1, 256, 5, 5)
层名+输出特征图的shape:conv8_1 (1, 128, 5, 5)
层名+输出特征图的shape:conv8_2 (1, 256, 3, 3)
层名+输出特征图的shape:conv8_2_conv8_2_relu_0_split_0 (1, 256, 3, 3)
层名+输出特征图的shape:conv8_2_conv8_2_relu_0_split_1 (1, 256, 3, 3)
层名+输出特征图的shape:conv8_2_conv8_2_relu_0_split_2 (1, 256, 3, 3)
层名+输出特征图的shape:conv8_2_conv8_2_relu_0_split_3 (1, 256, 3, 3)
层名+输出特征图的shape:conv9_1 (1, 128, 3, 3)
层名+输出特征图的shape:conv9_2 (1, 256, 1, 1)
层名+输出特征图的shape:conv9_2_conv9_2_relu_0_split_0 (1, 256, 1, 1)
层名+输出特征图的shape:conv9_2_conv9_2_relu_0_split_1 (1, 256, 1, 1)
层名+输出特征图的shape:conv9_2_conv9_2_relu_0_split_2 (1, 256, 1, 1)
层名+输出特征图的shape:conv4_3_norm (1, 256, 38, 38)
层名+输出特征图的shape:conv4_3_norm_conv4_3_norm_0_split_0 (1, 256, 38, 38)
层名+输出特征图的shape:conv4_3_norm_conv4_3_norm_0_split_1 (1, 256, 38, 38)
层名+输出特征图的shape:conv4_3_norm_conv4_3_norm_0_split_2 (1, 256, 38, 38)
层名+输出特征图的shape:conv4_3_norm_mbox_loc (1, 16, 38, 38)
层名+输出特征图的shape:conv4_3_norm_mbox_loc_perm (1, 38, 38, 16)
层名+输出特征图的shape:conv4_3_norm_mbox_loc_flat (1, 23104)
层名+输出特征图的shape:conv4_3_norm_mbox_conf (1, 8, 38, 38)
层名+输出特征图的shape:conv4_3_norm_mbox_conf_perm (1, 38, 38, 8)
层名+输出特征图的shape:conv4_3_norm_mbox_conf_flat (1, 11552)
层名+输出特征图的shape:conv4_3_norm_mbox_priorbox (1, 2, 23104)
层名+输出特征图的shape:conv5_3_mbox_loc (1, 24, 19, 19)
层名+输出特征图的shape:conv5_3_mbox_loc_perm (1, 19, 19, 24)
层名+输出特征图的shape:conv5_3_mbox_loc_flat (1, 8664)
层名+输出特征图的shape:conv5_3_mbox_conf (1, 12, 19, 19)
层名+输出特征图的shape:conv5_3_mbox_conf_perm (1, 19, 19, 12)
层名+输出特征图的shape:conv5_3_mbox_conf_flat (1, 4332)
层名+输出特征图的shape:conv5_3_mbox_priorbox (1, 2, 8664)
层名+输出特征图的shape:conv6_2_mbox_loc (1, 24, 10, 10)
层名+输出特征图的shape:conv6_2_mbox_loc_perm (1, 10, 10, 24)
层名+输出特征图的shape:conv6_2_mbox_loc_flat (1, 2400)
层名+输出特征图的shape:conv6_2_mbox_conf (1, 12, 10, 10)
层名+输出特征图的shape:conv6_2_mbox_conf_perm (1, 10, 10, 12)
层名+输出特征图的shape:conv6_2_mbox_conf_flat (1, 1200)
层名+输出特征图的shape:conv6_2_mbox_priorbox (1, 2, 2400)
层名+输出特征图的shape:conv7_2_mbox_loc (1, 24, 5, 5)
层名+输出特征图的shape:conv7_2_mbox_loc_perm (1, 5, 5, 24)
层名+输出特征图的shape:conv7_2_mbox_loc_flat (1, 600)
层名+输出特征图的shape:conv7_2_mbox_conf (1, 12, 5, 5)
层名+输出特征图的shape:conv7_2_mbox_conf_perm (1, 5, 5, 12)
层名+输出特征图的shape:conv7_2_mbox_conf_flat (1, 300)
层名+输出特征图的shape:conv7_2_mbox_priorbox (1, 2, 600)
层名+输出特征图的shape:conv8_2_mbox_loc (1, 16, 3, 3)
层名+输出特征图的shape:conv8_2_mbox_loc_perm (1, 3, 3, 16)
层名+输出特征图的shape:conv8_2_mbox_loc_flat (1, 144)
层名+输出特征图的shape:conv8_2_mbox_conf (1, 8, 3, 3)
层名+输出特征图的shape:conv8_2_mbox_conf_perm (1, 3, 3, 8)
层名+输出特征图的shape:conv8_2_mbox_conf_flat (1, 72)
层名+输出特征图的shape:conv8_2_mbox_priorbox (1, 2, 144)
层名+输出特征图的shape:conv9_2_mbox_loc (1, 16, 1, 1)
层名+输出特征图的shape:conv9_2_mbox_loc_perm (1, 1, 1, 16)
层名+输出特征图的shape:conv9_2_mbox_loc_flat (1, 16)
层名+输出特征图的shape:conv9_2_mbox_conf (1, 8, 1, 1)
层名+输出特征图的shape:conv9_2_mbox_conf_perm (1, 1, 1, 8)
层名+输出特征图的shape:conv9_2_mbox_conf_flat (1, 8)
层名+输出特征图的shape:conv9_2_mbox_priorbox (1, 2, 16)
层名+输出特征图的shape:mbox_loc (1, 34928)
层名+输出特征图的shape:mbox_conf (1, 17464)
层名+输出特征图的shape:mbox_priorbox (1, 2, 34928)
层名+输出特征图的shape:mbox_conf_reshape (1, 8732, 2)
层名+输出特征图的shape:mbox_conf_softmax (1, 8732, 2)
层名+输出特征图的shape:mbox_conf_flatten (1, 17464)
层名+输出特征图的shape:detection_out (1, 1, 200, 7)
# 定义了detection out prior box层的输入
# 38*38 19*19 10*10 5*5 3*3 1*1
mbox_source_layers = ['conv4_3', 'conv5_3', 'conv6_2', 'conv7_2', 'conv8_2', 'conv9_2']
层名+卷积核W参数的shape:conv1_1 (32, 3, 3, 3)
层名+卷积核W参数的shape:conv1_2 (32, 32, 3, 3)
层名+卷积核W参数的shape:conv2_1 (64, 32, 3, 3)
层名+卷积核W参数的shape:conv2_2 (64, 64, 3, 3)
层名+卷积核W参数的shape:conv3_1 (128, 64, 3, 3)
层名+卷积核W参数的shape:conv3_3 (128, 128, 3, 3)
层名+卷积核W参数的shape:conv4_1 (256, 128, 3, 3)
层名+卷积核W参数的shape:conv4_3 (256, 256, 3, 3)
层名+卷积核W参数的shape:conv5_1 (256, 256, 3, 3)
层名+卷积核W参数的shape:conv5_3 (256, 256, 3, 3)
层名+卷积核W参数的shape:conv6_1 (256, 256, 1, 1)
层名+卷积核W参数的shape:conv6_2 (512, 256, 3, 3)
层名+卷积核W参数的shape:conv7_1 (128, 512, 1, 1)
层名+卷积核W参数的shape:conv7_2 (256, 128, 3, 3)
层名+卷积核W参数的shape:conv8_1 (128, 256, 1, 1)
层名+卷积核W参数的shape:conv8_2 (256, 128, 3, 3)
层名+卷积核W参数的shape:conv9_1 (128, 256, 1, 1)
层名+卷积核W参数的shape:conv9_2 (256, 128, 3, 3)
层名+卷积核W参数的shape:conv4_3_norm (256,)
层名+卷积核W参数的shape:conv4_3_norm_mbox_loc (16, 256, 3, 3)
层名+卷积核W参数的shape:conv4_3_norm_mbox_conf (8, 256, 3, 3)
层名+卷积核W参数的shape:conv5_3_mbox_loc (24, 256, 3, 3)
层名+卷积核W参数的shape:conv5_3_mbox_conf (12, 256, 3, 3)
层名+卷积核W参数的shape:conv6_2_mbox_loc (24, 512, 3, 3)
层名+卷积核W参数的shape:conv6_2_mbox_conf (12, 512, 3, 3)
层名+卷积核W参数的shape:conv7_2_mbox_loc (24, 256, 3, 3)
层名+卷积核W参数的shape:conv7_2_mbox_conf (12, 256, 3, 3)
层名+卷积核W参数的shape:conv8_2_mbox_loc (16, 256, 3, 3)
层名+卷积核W参数的shape:conv8_2_mbox_conf (8, 256, 3, 3)
层名+卷积核W参数的shape:conv9_2_mbox_loc (16, 256, 3, 3)
层名+卷积核W参数的shape:conv9_2_mbox_conf (8, 256, 3, 3)
name: "VGG_WiderFace_Caffe_SSD_300x300_deploy"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 300
dim: 300
}
layer {
name: "conv1_1"
type: "Convolution"
bottom: "data"
top: "conv1_1"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 32
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "relu1_1"
type: "ReLU"
bottom: "conv1_1"
top: "conv1_1"
}
layer {
name: "conv1_2"
type: "Convolution"
bottom: "conv1_1"
top: "conv1_2"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 32
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
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"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "relu2_1"
type: "ReLU"
bottom: "conv2_1"
top: "conv2_1"
}
layer {
name: "conv2_2"
type: "Convolution"
bottom: "conv2_1"
top: "conv2_2"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
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"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "relu3_1"
type: "ReLU"
bottom: "conv3_1"
top: "conv3_1"
}
layer {
name: "conv3_3"
type: "Convolution"
bottom: "conv3_1"
top: "conv3_3"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
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"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "relu4_1"
type: "ReLU"
bottom: "conv4_1"
top: "conv4_1"
}
layer {
name: "conv4_3"
type: "Convolution"
bottom: "conv4_1"
top: "conv4_3"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
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: 2
}
}
layer {
name: "conv5_1"
type: "Convolution"
bottom: "pool4"
top: "conv5_1"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu5_1"
type: "ReLU"
bottom: "conv5_1"
top: "conv5_1"
}
layer {
name: "conv5_3"
type: "Convolution"
bottom: "conv5_1"
top: "conv5_3"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu5_3"
type: "ReLU"
bottom: "conv5_3"
top: "conv5_3"
}
layer {
name: "conv6_1"
type: "Convolution"
bottom: "conv5_3"
top: "conv6_1"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv6_1_relu"
type: "ReLU"
bottom: "conv6_1"
top: "conv6_1"
}
layer {
name: "conv6_2"
type: "Convolution"
bottom: "conv6_1"
top: "conv6_2"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv6_2_relu"
type: "ReLU"
bottom: "conv6_2"
top: "conv6_2"
}
layer {
name: "conv7_1"
type: "Convolution"
bottom: "conv6_2"
top: "conv7_1"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 128
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv7_1_relu"
type: "ReLU"
bottom: "conv7_1"
top: "conv7_1"
}
layer {
name: "conv7_2"
type: "Convolution"
bottom: "conv7_1"
top: "conv7_2"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv7_2_relu"
type: "ReLU"
bottom: "conv7_2"
top: "conv7_2"
}
layer {
name: "conv8_1"
type: "Convolution"
bottom: "conv7_2"
top: "conv8_1"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 128
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv8_1_relu"
type: "ReLU"
bottom: "conv8_1"
top: "conv8_1"
}
layer {
name: "conv8_2"
type: "Convolution"
bottom: "conv8_1"
top: "conv8_2"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 0
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv8_2_relu"
type: "ReLU"
bottom: "conv8_2"
top: "conv8_2"
}
layer {
name: "conv9_1"
type: "Convolution"
bottom: "conv8_2"
top: "conv9_1"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 128
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv9_1_relu"
type: "ReLU"
bottom: "conv9_1"
top: "conv9_1"
}
layer {
name: "conv9_2"
type: "Convolution"
bottom: "conv9_1"
top: "conv9_2"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 256
pad: 0
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv9_2_relu"
type: "ReLU"
bottom: "conv9_2"
top: "conv9_2"
}
layer {
name: "conv4_3_norm"
type: "Normalize"
bottom: "conv4_3"
top: "conv4_3_norm"
norm_param {
across_spatial: false
scale_filler {
type: "constant"
value: 20.0
}
channel_shared: false
}
}
layer {
name: "conv4_3_norm_mbox_loc"
type: "Convolution"
bottom: "conv4_3_norm"
top: "conv4_3_norm_mbox_loc"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 16
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv4_3_norm_mbox_loc_perm"
type: "Permute"
bottom: "conv4_3_norm_mbox_loc"
top: "conv4_3_norm_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv4_3_norm_mbox_loc_flat"
type: "Flatten"
bottom: "conv4_3_norm_mbox_loc_perm"
top: "conv4_3_norm_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv4_3_norm_mbox_conf"
type: "Convolution"
bottom: "conv4_3_norm"
top: "conv4_3_norm_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 8
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv4_3_norm_mbox_conf_perm"
type: "Permute"
bottom: "conv4_3_norm_mbox_conf"
top: "conv4_3_norm_mbox_conf_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv4_3_norm_mbox_conf_flat"
type: "Flatten"
bottom: "conv4_3_norm_mbox_conf_perm"
top: "conv4_3_norm_mbox_conf_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv4_3_norm_mbox_priorbox"
type: "PriorBox"
bottom: "conv4_3_norm"
bottom: "data"
top: "conv4_3_norm_mbox_priorbox"
prior_box_param {
min_size: 30.0
max_size: 60.0
aspect_ratio: 2.0
flip: true
clip: false
variance: 0.10000000149
variance: 0.10000000149
variance: 0.20000000298
variance: 0.20000000298
step: 8.0
offset: 0.5
}
}
layer {
name: "conv5_3_mbox_loc"
type: "Convolution"
bottom: "conv5_3"
top: "conv5_3_mbox_loc"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 24
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv5_3_mbox_loc_perm"
type: "Permute"
bottom: "conv5_3_mbox_loc"
top: "conv5_3_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv5_3_mbox_loc_flat"
type: "Flatten"
bottom: "conv5_3_mbox_loc_perm"
top: "conv5_3_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv5_3_mbox_conf"
type: "Convolution"
bottom: "conv5_3"
top: "conv5_3_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 12
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv5_3_mbox_conf_perm"
type: "Permute"
bottom: "conv5_3_mbox_conf"
top: "conv5_3_mbox_conf_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv5_3_mbox_conf_flat"
type: "Flatten"
bottom: "conv5_3_mbox_conf_perm"
top: "conv5_3_mbox_conf_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv5_3_mbox_priorbox"
type: "PriorBox"
bottom: "conv5_3"
bottom: "data"
top: "conv5_3_mbox_priorbox"
prior_box_param {
min_size: 60.0
max_size: 111.0
aspect_ratio: 2.0
aspect_ratio: 3.0
flip: true
clip: false
variance: 0.10000000149
variance: 0.10000000149
variance: 0.20000000298
variance: 0.20000000298
step: 16.0
offset: 0.5
}
}
layer {
name: "conv6_2_mbox_loc"
type: "Convolution"
bottom: "conv6_2"
top: "conv6_2_mbox_loc"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 24
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv6_2_mbox_loc_perm"
type: "Permute"
bottom: "conv6_2_mbox_loc"
top: "conv6_2_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv6_2_mbox_loc_flat"
type: "Flatten"
bottom: "conv6_2_mbox_loc_perm"
top: "conv6_2_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv6_2_mbox_conf"
type: "Convolution"
bottom: "conv6_2"
top: "conv6_2_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 12
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv6_2_mbox_conf_perm"
type: "Permute"
bottom: "conv6_2_mbox_conf"
top: "conv6_2_mbox_conf_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv6_2_mbox_conf_flat"
type: "Flatten"
bottom: "conv6_2_mbox_conf_perm"
top: "conv6_2_mbox_conf_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv6_2_mbox_priorbox"
type: "PriorBox"
bottom: "conv6_2"
bottom: "data"
top: "conv6_2_mbox_priorbox"
prior_box_param {
min_size: 111.0
max_size: 162.0
aspect_ratio: 2.0
aspect_ratio: 3.0
flip: true
clip: false
variance: 0.10000000149
variance: 0.10000000149
variance: 0.20000000298
variance: 0.20000000298
step: 32.0
offset: 0.5
}
}
layer {
name: "conv7_2_mbox_loc"
type: "Convolution"
bottom: "conv7_2"
top: "conv7_2_mbox_loc"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 24
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv7_2_mbox_loc_perm"
type: "Permute"
bottom: "conv7_2_mbox_loc"
top: "conv7_2_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv7_2_mbox_loc_flat"
type: "Flatten"
bottom: "conv7_2_mbox_loc_perm"
top: "conv7_2_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv7_2_mbox_conf"
type: "Convolution"
bottom: "conv7_2"
top: "conv7_2_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 12
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv7_2_mbox_conf_perm"
type: "Permute"
bottom: "conv7_2_mbox_conf"
top: "conv7_2_mbox_conf_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv7_2_mbox_conf_flat"
type: "Flatten"
bottom: "conv7_2_mbox_conf_perm"
top: "conv7_2_mbox_conf_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv7_2_mbox_priorbox"
type: "PriorBox"
bottom: "conv7_2"
bottom: "data"
top: "conv7_2_mbox_priorbox"
prior_box_param {
min_size: 162.0
max_size: 213.0
aspect_ratio: 2.0
aspect_ratio: 3.0
flip: true
clip: false
variance: 0.10000000149
variance: 0.10000000149
variance: 0.20000000298
variance: 0.20000000298
step: 64.0
offset: 0.5
}
}
layer {
name: "conv8_2_mbox_loc"
type: "Convolution"
bottom: "conv8_2"
top: "conv8_2_mbox_loc"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 16
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv8_2_mbox_loc_perm"
type: "Permute"
bottom: "conv8_2_mbox_loc"
top: "conv8_2_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv8_2_mbox_loc_flat"
type: "Flatten"
bottom: "conv8_2_mbox_loc_perm"
top: "conv8_2_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv8_2_mbox_conf"
type: "Convolution"
bottom: "conv8_2"
top: "conv8_2_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 8
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv8_2_mbox_conf_perm"
type: "Permute"
bottom: "conv8_2_mbox_conf"
top: "conv8_2_mbox_conf_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv8_2_mbox_conf_flat"
type: "Flatten"
bottom: "conv8_2_mbox_conf_perm"
top: "conv8_2_mbox_conf_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv8_2_mbox_priorbox"
type: "PriorBox"
bottom: "conv8_2"
bottom: "data"
top: "conv8_2_mbox_priorbox"
prior_box_param {
min_size: 213.0
max_size: 264.0
aspect_ratio: 2.0
flip: true
clip: false
variance: 0.10000000149
variance: 0.10000000149
variance: 0.20000000298
variance: 0.20000000298
step: 100.0
offset: 0.5
}
}
layer {
name: "conv9_2_mbox_loc"
type: "Convolution"
bottom: "conv9_2"
top: "conv9_2_mbox_loc"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 16
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv9_2_mbox_loc_perm"
type: "Permute"
bottom: "conv9_2_mbox_loc"
top: "conv9_2_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv9_2_mbox_loc_flat"
type: "Flatten"
bottom: "conv9_2_mbox_loc_perm"
top: "conv9_2_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv9_2_mbox_conf"
type: "Convolution"
bottom: "conv9_2"
top: "conv9_2_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 8
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv9_2_mbox_conf_perm"
type: "Permute"
bottom: "conv9_2_mbox_conf"
top: "conv9_2_mbox_conf_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv9_2_mbox_conf_flat"
type: "Flatten"
bottom: "conv9_2_mbox_conf_perm"
top: "conv9_2_mbox_conf_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv9_2_mbox_priorbox"
type: "PriorBox"
bottom: "conv9_2"
bottom: "data"
top: "conv9_2_mbox_priorbox"
prior_box_param {
min_size: 264.0
max_size: 315.0
aspect_ratio: 2.0
flip: true
clip: false
variance: 0.10000000149
variance: 0.10000000149
variance: 0.20000000298
variance: 0.20000000298
step: 300.0
offset: 0.5
}
}
layer {
name: "mbox_loc"
type: "Concat"
bottom: "conv4_3_norm_mbox_loc_flat"
bottom: "conv5_3_mbox_loc_flat"
bottom: "conv6_2_mbox_loc_flat"
bottom: "conv7_2_mbox_loc_flat"
bottom: "conv8_2_mbox_loc_flat"
bottom: "conv9_2_mbox_loc_flat"
top: "mbox_loc"
concat_param {
axis: 1
}
}
layer {
name: "mbox_conf"
type: "Concat"
bottom: "conv4_3_norm_mbox_conf_flat"
bottom: "conv5_3_mbox_conf_flat"
bottom: "conv6_2_mbox_conf_flat"
bottom: "conv7_2_mbox_conf_flat"
bottom: "conv8_2_mbox_conf_flat"
bottom: "conv9_2_mbox_conf_flat"
top: "mbox_conf"
concat_param {
axis: 1
}
}
layer {
name: "mbox_priorbox"
type: "Concat"
bottom: "conv4_3_norm_mbox_priorbox"
bottom: "conv5_3_mbox_priorbox"
bottom: "conv6_2_mbox_priorbox"
bottom: "conv7_2_mbox_priorbox"
bottom: "conv8_2_mbox_priorbox"
bottom: "conv9_2_mbox_priorbox"
top: "mbox_priorbox"
concat_param {
axis: 2
}
}
layer {
name: "mbox_conf_reshape"
type: "Reshape"
bottom: "mbox_conf"
top: "mbox_conf_reshape"
reshape_param {
shape {
dim: 0
dim: -1
dim: 2
}
}
}
layer {
name: "mbox_conf_softmax"
type: "Softmax"
bottom: "mbox_conf_reshape"
top: "mbox_conf_softmax"
softmax_param {
axis: 2
}
}
layer {
name: "mbox_conf_flatten"
type: "Flatten"
bottom: "mbox_conf_softmax"
top: "mbox_conf_flatten"
flatten_param {
axis: 1
}
}
layer {
name: "detection_out"
type: "DetectionOutput"
bottom: "mbox_loc"
bottom: "mbox_conf_flatten"
bottom: "mbox_priorbox"
top: "detection_out"
include {
phase: TEST
}
detection_output_param {
num_classes: 2
share_location: true
background_label_id: 0
nms_param {
nms_threshold: 0.600000023842
top_k: 400
}
save_output_param {
output_directory: "examples/ssd/ssd_face_dfy_results/results_WiderFace/Caffe_SSD_300x300/Main"
output_name_prefix: "comp4_det_test_"
output_format: "VOC"
label_map_file: "/home/dfy888/py2_caffe_source_works/caffe-ssd-py2/data/WiderFace/labelmap_voc.prototxt"
name_size_file: "/home/dfy888/py2_caffe_source_works/caffe-ssd-py2/data/WiderFace/test_name_size.txt"
num_test_image: 1000
}
code_type: CENTER_SIZE
keep_top_k: 200
confidence_threshold: 0.00999999977648
}
}
复制代码
作者:
东方耀
时间:
2019-9-25 16:51
'conv4_3_norm',
'conv4_3_norm_mbox_loc',
'conv4_3_norm_mbox_loc_perm', 'conv4_3_norm_mbox_loc_flat',
'conv4_3_norm_mbox_conf',
'conv4_3_norm_mbox_conf_perm', 'conv4_3_norm_mbox_conf_flat',
'conv4_3_norm_mbox_priorbox',
复制代码
作者:
东方耀
时间:
2019-9-25 17:04
东方耀 发表于 2019-9-25 16:51
# Create location prediction layer创建定位预测层. loc_postfix=''
name = "{}_mbox_loc{}".format(from_layer, loc_postfix)
# 每一个priors box均需要4个坐标值来定位 xywh
num_loc_output = num_priors_per_location * 4
# share_location = True
if not share_location:
num_loc_output *= num_classes
# from_layer = conv4_3_norm
ConvBNLayer(net, from_layer, name, use_bn=use_batchnorm, use_relu=False, lr_mult=lr_mult,
num_output=num_loc_output, kernel_size=kernel_size, pad=pad, stride=1, **bn_param)
permute_name = "{}_perm".format(name)
net[permute_name] = L.Permute(net[name], order=[0, 2, 3, 1])
flatten_name = "{}_flat".format(name)
net[flatten_name] = L.Flatten(net[permute_name], axis=1)
loc_layers.append(net[flatten_name])
复制代码
作者:
东方耀
时间:
2019-9-25 17:05
东方耀 发表于 2019-9-25 16:51
# Create confidence prediction layer创建置信度预测层.conf_postfix=''
# from_layer = conv4_3_norm
name = "{}_mbox_conf{}".format(from_layer, conf_postfix)
# 每个box需要预测的类别数2
num_conf_output = num_priors_per_location * num_classes
ConvBNLayer(net, from_layer, name, use_bn=use_batchnorm, use_relu=False, lr_mult=lr_mult,
num_output=num_conf_output, kernel_size=kernel_size, pad=pad, stride=1, **bn_param)
permute_name = "{}_perm".format(name)
net[permute_name] = L.Permute(net[name], order=[0, 2, 3, 1])
flatten_name = "{}_flat".format(name)
net[flatten_name] = L.Flatten(net[permute_name], axis=1)
conf_layers.append(net[flatten_name])
复制代码
作者:
东方耀
时间:
2019-9-25 17:19
'conv5_3_mbox_loc', 'conv5_3_mbox_loc_perm', 'conv5_3_mbox_loc_flat',
'conv5_3_mbox_conf', 'conv5_3_mbox_conf_perm', 'conv5_3_mbox_conf_flat',
'conv5_3_mbox_priorbox',
'conv6_2_mbox_loc', 'conv6_2_mbox_loc_perm', 'conv6_2_mbox_loc_flat',
'conv6_2_mbox_conf', 'conv6_2_mbox_conf_perm', 'conv6_2_mbox_conf_flat',
'conv6_2_mbox_priorbox',
'conv7_2_mbox_loc', 'conv7_2_mbox_loc_perm', 'conv7_2_mbox_loc_flat',
'conv7_2_mbox_conf', 'conv7_2_mbox_conf_perm', 'conv7_2_mbox_conf_flat',
'conv7_2_mbox_priorbox',
'conv8_2_mbox_loc', 'conv8_2_mbox_loc_perm', 'conv8_2_mbox_loc_flat',
'conv8_2_mbox_conf', 'conv8_2_mbox_conf_perm', 'conv8_2_mbox_conf_flat',
'conv8_2_mbox_priorbox',
'conv9_2_mbox_loc', 'conv9_2_mbox_loc_perm', 'conv9_2_mbox_loc_flat',
'conv9_2_mbox_conf', 'conv9_2_mbox_conf_perm', 'conv9_2_mbox_conf_flat',
'conv9_2_mbox_priorbox',
复制代码
作者:
东方耀
时间:
2019-9-25 18:08
Caffe中各种梯度下降法:
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
作者:
xsoft
时间:
2020-2-3 15:47
谢谢老师提供的资料。
欢迎光临 东方耀AI技术分享 (http://ai111.vip/)
Powered by Discuz! X3.4