Created
December 25, 2016 05:21
-
-
Save dongzhuoyao/c8649fa7f5d4a5132241d6bba3420daf to your computer and use it in GitHub Desktop.
deeplabv2_vgg16_test
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
| # VGG 16-layer network convolutional finetuning | |
| # Network modified to have smaller receptive field (128 pixels) | |
| # and smaller stride (8 pixels) when run in convolutional mode. | |
| # | |
| # In this model we also change max pooling size in the first 4 layers | |
| # from 2 to 3 while retaining stride = 2 | |
| # which makes it easier to exactly align responses at different layers. | |
| # | |
| name: "deeplabv2_vgg16_test" | |
| layer { | |
| name: "data" | |
| type: "ImageSegData" | |
| top: "data" | |
| top: "label" | |
| top: "data_dim" | |
| include { | |
| phase: TEST | |
| } | |
| transform_param { | |
| mirror: false | |
| crop_size: 513 | |
| mean_value: 104.008 | |
| mean_value: 116.669 | |
| mean_value: 122.675 | |
| } | |
| image_data_param { | |
| root_folder: "" | |
| source: "camvid/list/val.txt" | |
| batch_size: 1 | |
| label_type: NONE | |
| } | |
| } | |
| ###################### DeepLab ########################## | |
| 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: 3 | |
| stride: 2 | |
| pad: 1 | |
| } | |
| } | |
| 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: 3 | |
| stride: 2 | |
| pad: 1 | |
| } | |
| } | |
| 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: 3 | |
| stride: 2 | |
| pad: 1 | |
| } | |
| } | |
| 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 { | |
| bottom: "conv4_3" | |
| top: "pool4" | |
| name: "pool4" | |
| type: "Pooling" | |
| pooling_param { | |
| pool: MAX | |
| kernel_size: 3 | |
| pad: 1 | |
| 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 { | |
| bottom: "conv5_3" | |
| top: "pool5" | |
| name: "pool5" | |
| type: "Pooling" | |
| pooling_param { | |
| pool: MAX | |
| kernel_size: 3 | |
| stride: 1 | |
| pad: 1 | |
| } | |
| } | |
| ### hole = 6 | |
| layer { | |
| name: "fc6_1" | |
| type: "Convolution" | |
| bottom: "pool5" | |
| top: "fc6_1" | |
| convolution_param { | |
| num_output: 1024 | |
| pad: 6 | |
| kernel_size: 3 | |
| dilation: 6 | |
| } | |
| } | |
| layer { | |
| name: "relu6_1" | |
| type: "ReLU" | |
| bottom: "fc6_1" | |
| top: "fc6_1" | |
| } | |
| layer { | |
| name: "drop6_1" | |
| type: "Dropout" | |
| bottom: "fc6_1" | |
| top: "fc6_1" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc7_1" | |
| type: "Convolution" | |
| bottom: "fc6_1" | |
| top: "fc7_1" | |
| convolution_param { | |
| num_output: 1024 | |
| kernel_size: 1 | |
| } | |
| } | |
| layer { | |
| name: "relu7_1" | |
| type: "ReLU" | |
| bottom: "fc7_1" | |
| top: "fc7_1" | |
| } | |
| layer { | |
| name: "drop7_1" | |
| type: "Dropout" | |
| bottom: "fc7_1" | |
| top: "fc7_1" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc8_camvid_1" | |
| type: "Convolution" | |
| bottom: "fc7_1" | |
| top: "fc8_camvid_1" | |
| convolution_param { | |
| num_output: 12 | |
| kernel_size: 1 | |
| } | |
| } | |
| ### hole = 12 | |
| layer { | |
| name: "fc6_2" | |
| type: "Convolution" | |
| bottom: "pool5" | |
| top: "fc6_2" | |
| convolution_param { | |
| num_output: 1024 | |
| pad: 12 | |
| kernel_size: 3 | |
| dilation: 12 | |
| } | |
| } | |
| layer { | |
| name: "relu6_2" | |
| type: "ReLU" | |
| bottom: "fc6_2" | |
| top: "fc6_2" | |
| } | |
| layer { | |
| name: "drop6_2" | |
| type: "Dropout" | |
| bottom: "fc6_2" | |
| top: "fc6_2" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc7_2" | |
| type: "Convolution" | |
| bottom: "fc6_2" | |
| top: "fc7_2" | |
| convolution_param { | |
| num_output: 1024 | |
| kernel_size: 1 | |
| } | |
| } | |
| layer { | |
| name: "relu7_2" | |
| type: "ReLU" | |
| bottom: "fc7_2" | |
| top: "fc7_2" | |
| } | |
| layer { | |
| name: "drop7_2" | |
| type: "Dropout" | |
| bottom: "fc7_2" | |
| top: "fc7_2" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc8_camvid_2" | |
| type: "Convolution" | |
| bottom: "fc7_2" | |
| top: "fc8_camvid_2" | |
| convolution_param { | |
| num_output: 12 | |
| kernel_size: 1 | |
| } | |
| } | |
| ### hole = 18 | |
| layer { | |
| name: "fc6_3" | |
| type: "Convolution" | |
| bottom: "pool5" | |
| top: "fc6_3" | |
| convolution_param { | |
| num_output: 1024 | |
| pad: 18 | |
| kernel_size: 3 | |
| dilation: 18 | |
| } | |
| } | |
| layer { | |
| name: "relu6_3" | |
| type: "ReLU" | |
| bottom: "fc6_3" | |
| top: "fc6_3" | |
| } | |
| layer { | |
| name: "drop6_3" | |
| type: "Dropout" | |
| bottom: "fc6_3" | |
| top: "fc6_3" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc7_3" | |
| type: "Convolution" | |
| bottom: "fc6_3" | |
| top: "fc7_3" | |
| convolution_param { | |
| num_output: 1024 | |
| kernel_size: 1 | |
| } | |
| } | |
| layer { | |
| name: "relu7_3" | |
| type: "ReLU" | |
| bottom: "fc7_3" | |
| top: "fc7_3" | |
| } | |
| layer { | |
| name: "drop7_3" | |
| type: "Dropout" | |
| bottom: "fc7_3" | |
| top: "fc7_3" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc8_camvid_3" | |
| type: "Convolution" | |
| bottom: "fc7_3" | |
| top: "fc8_camvid_3" | |
| convolution_param { | |
| num_output: 12 | |
| kernel_size: 1 | |
| } | |
| } | |
| ### hole = 24 | |
| layer { | |
| name: "fc6_4" | |
| type: "Convolution" | |
| bottom: "pool5" | |
| top: "fc6_4" | |
| convolution_param { | |
| num_output: 1024 | |
| pad: 24 | |
| kernel_size: 3 | |
| dilation: 24 | |
| } | |
| } | |
| layer { | |
| name: "relu6_4" | |
| type: "ReLU" | |
| bottom: "fc6_4" | |
| top: "fc6_4" | |
| } | |
| layer { | |
| name: "drop6_4" | |
| type: "Dropout" | |
| bottom: "fc6_4" | |
| top: "fc6_4" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc7_4" | |
| type: "Convolution" | |
| bottom: "fc6_4" | |
| top: "fc7_4" | |
| convolution_param { | |
| num_output: 1024 | |
| kernel_size: 1 | |
| } | |
| } | |
| layer { | |
| name: "relu7_4" | |
| type: "ReLU" | |
| bottom: "fc7_4" | |
| top: "fc7_4" | |
| } | |
| layer { | |
| name: "drop7_4" | |
| type: "Dropout" | |
| bottom: "fc7_4" | |
| top: "fc7_4" | |
| dropout_param { | |
| dropout_ratio: 0.5 | |
| } | |
| } | |
| layer { | |
| name: "fc8_camvid_4" | |
| type: "Convolution" | |
| bottom: "fc7_4" | |
| top: "fc8_camvid_4" | |
| convolution_param { | |
| num_output: 12 | |
| kernel_size: 1 | |
| } | |
| } | |
| ### SUM the four branches | |
| layer { | |
| bottom: "fc8_camvid_1" | |
| bottom: "fc8_camvid_2" | |
| bottom: "fc8_camvid_3" | |
| bottom: "fc8_camvid_4" | |
| top: "fc8_camvid" | |
| name: "fc8_camvid" | |
| type: "Eltwise" | |
| eltwise_param { | |
| operation: SUM | |
| } | |
| } | |
| ## original resolution | |
| layer { | |
| name: "fc8_interp" | |
| type: "Interp" | |
| bottom: "fc8_camvid" | |
| top: "fc8_interp" | |
| interp_param { | |
| zoom_factor: 8 | |
| } | |
| } | |
| # layer { | |
| # bottom: "fc8_interp" | |
| # top: "fc8_interp_argmax" | |
| # name: "fc8_interp_argmax" | |
| # type: "ArgMax" | |
| # argmax_param { | |
| # axis: 1 | |
| # } | |
| # } | |
| layer { | |
| name: "fc8_mat" | |
| type: "MatWrite" | |
| # bottom: "fc8_interp_argmax" | |
| bottom: "fc8_interp" | |
| include { | |
| phase: TEST | |
| } | |
| mat_write_param { | |
| prefix: "camvid/features/deeplabv2_vgg16/val/fc8/" | |
| source: "camvid/list/val_id.txt" | |
| strip: 0 | |
| period: 1 | |
| } | |
| } | |
| layer { | |
| name: "silence" | |
| type: "Silence" | |
| bottom: "label" | |
| bottom: "data_dim" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment