Skip to content

Instantly share code, notes, and snippets.

@hustzxd
Last active July 11, 2017 03:17
Show Gist options
  • Save hustzxd/48a318c81493eeb12d1b57cc0938ddea to your computer and use it in GitHub Desktop.
Save hustzxd/48a318c81493eeb12d1b57cc0938ddea to your computer and use it in GitHub Desktop.
name: "YOLONET"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 1 dim: 3 dim: 416 dim: 416 } }
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
convolution_param {
num_output: 32
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn1"
type: "BatchNorm"
bottom: "conv1"
top: "conv1"
}
layer {
name: "scale1"
type: "Scale"
bottom: "conv1"
top: "conv1"
scale_param {
bias_term: true
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "conv1"
top: "conv1"
relu_param{
negative_slope: 0.1
}
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer{
name: "conv2"
type: "Convolution"
bottom: "pool1"
top: "conv2"
convolution_param {
num_output: 64
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn2"
type: "BatchNorm"
bottom: "conv2"
top: "conv2"
}
layer {
name: "scale2"
type: "Scale"
bottom: "conv2"
top: "conv2"
scale_param {
bias_term: true
}
}
layer {
name: "relu2"
type: "ReLU"
bottom: "conv2"
top: "conv2"
relu_param{
negative_slope: 0.1
}
}
layer {
name: "pool2"
type: "Pooling"
bottom: "conv2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer{
name: "conv3"
type: "Convolution"
bottom: "pool2"
top: "conv3"
convolution_param {
num_output: 128
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn3"
type: "BatchNorm"
bottom: "conv3"
top: "conv3"
}
layer {
name: "scale3"
type: "Scale"
bottom: "conv3"
top: "conv3"
scale_param {
bias_term: true
}
}
layer {
name: "relu3"
type: "ReLU"
bottom: "conv3"
top: "conv3"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv4"
type: "Convolution"
bottom: "conv3"
top: "conv4"
convolution_param {
num_output: 64
kernel_size: 1
pad: 0 #??
stride: 1
bias_term: false
}
}
layer {
name: "bn4"
type: "BatchNorm"
bottom: "conv4"
top: "conv4"
}
layer {
name: "scale4"
type: "Scale"
bottom: "conv4"
top: "conv4"
scale_param {
bias_term: true
}
}
layer {
name: "relu4"
type: "ReLU"
bottom: "conv4"
top: "conv4"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv5"
type: "Convolution"
bottom: "conv4"
top: "conv5"
convolution_param {
num_output: 128
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn5"
type: "BatchNorm"
bottom: "conv5"
top: "conv5"
}
layer {
name: "scale5"
type: "Scale"
bottom: "conv5"
top: "conv5"
scale_param {
bias_term: true
}
}
layer {
name: "relu5"
type: "ReLU"
bottom: "conv5"
top: "conv5"
relu_param{
negative_slope: 0.1
}
}
layer {
name: "pool5"
type: "Pooling"
bottom: "conv5"
top: "pool5"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer{
name: "conv6"
type: "Convolution"
bottom: "pool5"
top: "conv6"
convolution_param {
num_output: 256
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn6"
type: "BatchNorm"
bottom: "conv6"
top: "conv6"
}
layer {
name: "scale6"
type: "Scale"
bottom: "conv6"
top: "conv6"
scale_param {
bias_term: true
}
}
layer {
name: "relu6"
type: "ReLU"
bottom: "conv6"
top: "conv6"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv7"
type: "Convolution"
bottom: "conv6"
top: "conv7"
convolution_param {
num_output: 128
kernel_size: 1
pad: 0
stride: 1
bias_term: false
}
}
layer {
name: "bn7"
type: "BatchNorm"
bottom: "conv7"
top: "conv7"
}
layer {
name: "scale7"
type: "Scale"
bottom: "conv7"
top: "conv7"
scale_param {
bias_term: true
}
}
layer {
name: "relu7"
type: "ReLU"
bottom: "conv7"
top: "conv7"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv8"
type: "Convolution"
bottom: "conv7"
top: "conv8"
convolution_param {
num_output: 256
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn8"
type: "BatchNorm"
bottom: "conv8"
top: "conv8"
}
layer {
name: "scale8"
type: "Scale"
bottom: "conv8"
top: "conv8"
scale_param {
bias_term: true
}
}
layer {
name: "relu8"
type: "ReLU"
bottom: "conv8"
top: "conv8"
relu_param{
negative_slope: 0.1
}
}
layer {
name: "pool8"
type: "Pooling"
bottom: "conv8"
top: "pool8"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer{
name: "conv9"
type: "Convolution"
bottom: "pool8"
top: "conv9"
convolution_param {
num_output: 512
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn9"
type: "BatchNorm"
bottom: "conv9"
top: "conv9"
}
layer {
name: "scale9"
type: "Scale"
bottom: "conv9"
top: "conv9"
scale_param {
bias_term: true
}
}
layer {
name: "relu9"
type: "ReLU"
bottom: "conv9"
top: "conv9"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv10"
type: "Convolution"
bottom: "conv9"
top: "conv10"
convolution_param {
num_output: 256
kernel_size: 1
pad: 0
stride: 1
bias_term: false
}
}
layer {
name: "bn10"
type: "BatchNorm"
bottom: "conv10"
top: "conv10"
}
layer {
name: "scale10"
type: "Scale"
bottom: "conv10"
top: "conv10"
scale_param {
bias_term: true
}
}
layer {
name: "relu10"
type: "ReLU"
bottom: "conv10"
top: "conv10"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv11"
type: "Convolution"
bottom: "conv10"
top: "conv11"
convolution_param {
num_output: 512
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn11"
type: "BatchNorm"
bottom: "conv11"
top: "conv11"
}
layer {
name: "scale11"
type: "Scale"
bottom: "conv11"
top: "conv11"
scale_param {
bias_term: true
}
}
layer {
name: "relu11"
type: "ReLU"
bottom: "conv11"
top: "conv11"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv12"
type: "Convolution"
bottom: "conv11"
top: "conv12"
convolution_param {
num_output: 256
kernel_size: 1
pad: 0
stride: 1
bias_term: false
}
}
layer {
name: "bn12"
type: "BatchNorm"
bottom: "conv12"
top: "conv12"
}
layer {
name: "scale12"
type: "Scale"
bottom: "conv12"
top: "conv12"
scale_param {
bias_term: true
}
}
layer {
name: "relu12"
type: "ReLU"
bottom: "conv12"
top: "conv12"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv13"
type: "Convolution"
bottom: "conv12"
top: "conv13"
convolution_param {
num_output: 512
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn13"
type: "BatchNorm"
bottom: "conv13"
top: "conv13"
}
layer {
name: "scale13"
type: "Scale"
bottom: "conv13"
top: "conv13"
scale_param {
bias_term: true
}
}
layer {
name: "relu13"
type: "ReLU"
bottom: "conv13"
top: "conv13"
relu_param{
negative_slope: 0.1
}
}
layer {
name: "pool13"
type: "Pooling"
bottom: "conv13"
top: "pool13"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer{
name: "conv14"
type: "Convolution"
bottom: "pool13"
top: "conv14"
convolution_param {
num_output: 1024
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn14"
type: "BatchNorm"
bottom: "conv14"
top: "conv14"
}
layer {
name: "scale14"
type: "Scale"
bottom: "conv14"
top: "conv14"
scale_param {
bias_term: true
}
}
layer {
name: "relu14"
type: "ReLU"
bottom: "conv14"
top: "conv14"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv15"
type: "Convolution"
bottom: "conv14"
top: "conv15"
convolution_param {
num_output: 512
kernel_size: 1
pad: 0
stride: 1
bias_term: false
}
}
layer {
name: "bn15"
type: "BatchNorm"
bottom: "conv15"
top: "conv15"
}
layer {
name: "scale15"
type: "Scale"
bottom: "conv15"
top: "conv15"
scale_param {
bias_term: true
}
}
layer {
name: "relu15"
type: "ReLU"
bottom: "conv15"
top: "conv15"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv16"
type: "Convolution"
bottom: "conv15"
top: "conv16"
convolution_param {
num_output: 1024
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn16"
type: "BatchNorm"
bottom: "conv16"
top: "conv16"
}
layer {
name: "scale16"
type: "Scale"
bottom: "conv16"
top: "conv16"
scale_param {
bias_term: true
}
}
layer {
name: "relu16"
type: "ReLU"
bottom: "conv16"
top: "conv16"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv17"
type: "Convolution"
bottom: "conv16"
top: "conv17"
convolution_param {
num_output: 512
kernel_size: 1
pad: 0
stride: 1
bias_term: false
}
}
layer {
name: "bn17"
type: "BatchNorm"
bottom: "conv17"
top: "conv17"
}
layer {
name: "scale17"
type: "Scale"
bottom: "conv17"
top: "conv17"
scale_param {
bias_term: true
}
}
layer {
name: "relu17"
type: "ReLU"
bottom: "conv17"
top: "conv17"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv18"
type: "Convolution"
bottom: "conv17"
top: "conv18"
convolution_param {
num_output: 1024
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn18"
type: "BatchNorm"
bottom: "conv18"
top: "conv18"
}
layer {
name: "scale18"
type: "Scale"
bottom: "conv18"
top: "conv18"
scale_param {
bias_term: true
}
}
layer {
name: "relu18"
type: "ReLU"
bottom: "conv18"
top: "conv18"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv19"
type: "Convolution"
bottom: "conv18"
top: "conv19"
convolution_param {
num_output: 1024
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn19"
type: "BatchNorm"
bottom: "conv19"
top: "conv19"
}
layer {
name: "scale19"
type: "Scale"
bottom: "conv19"
top: "conv19"
scale_param {
bias_term: true
}
}
layer {
name: "relu19"
type: "ReLU"
bottom: "conv19"
top: "conv19"
relu_param{
negative_slope: 0.1
}
}
layer{
name: "conv20"
type: "Convolution"
bottom: "conv19"
top: "conv20"
convolution_param {
num_output: 1024
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn20"
type: "BatchNorm"
bottom: "conv20"
top: "conv20"
}
layer {
name: "scale20"
type: "Scale"
bottom: "conv20"
top: "conv20"
scale_param {
bias_term: true
}
}
layer {
name: "relu20"
type: "ReLU"
bottom: "conv20"
top: "conv20"
relu_param {
negative_slope: 0.1
}
}
layer {
name: "reorg1"
type: "Reorg"
bottom: "conv13"
top: "reorg1"
reorg_param {
stride: 2
}
}
layer {
name: "concat2"
type: "Concat"
bottom: "reorg1"
bottom: "conv20"
top: "concat2"
}
layer{
name: "conv21"
type: "Convolution"
bottom: "concat2"
top: "conv21"
convolution_param {
num_output: 1024
kernel_size: 3
pad: 1
stride: 1
bias_term: false
}
}
layer {
name: "bn21"
type: "BatchNorm"
bottom: "conv21"
top: "conv21"
}
layer {
name: "scale21"
type: "Scale"
bottom: "conv21"
top: "conv21"
scale_param {
bias_term: true
}
}
layer {
name: "relu21"
type: "ReLU"
bottom: "conv21"
top: "conv21"
relu_param{
negative_slope: 0.1
}
}
layer {
name: "conv22"
type: "Convolution"
bottom: "conv21"
top: "conv22"
convolution_param {
num_output: 125
kernel_size: 1
pad: 0
stride: 1
}
}
# layer {
# name: "relu22"
# type: "ReLU"
# bottom: "conv22"
# top: "conv22"
# }
layer{
name: "permute"
type: "Permute"
bottom: "conv22"
top: "permute_conv_22"
permute_param {order: 0 order: 2 order: 3 order: 1}
}
# layer {
# name: "region1"
# type: "Region"
# bottom: "permute_conv_22"
# top: "region1"
# region_param {
# classes: 20
# # coords: 4
# boxes_of_each_grid: 5
# softmax: true
# }
# }
layer {
name: "region_output"
type: "RegionOutput"
bottom: "permute_conv_22"
top: "region_output"
region_output_param {
softmax: true
classes: 20
# coords: 4
boxes_of_each_grid: 5
thres_nms: 0.4
thres_prob: 0.25
anchor_coords {pw: 1.08 ph: 1.19}
anchor_coords {pw: 3.42 ph: 4.41}
anchor_coords {pw: 6.63 ph: 11.38}
anchor_coords {pw: 9.42 ph: 5.11}
anchor_coords {pw: 16.62 ph: 10.52}
}
}
#http://ethereon.github.io/netscope/#/gist/9640ecb59a75f230446e7c70d2f8bcf3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment