diff --git a/samples/data/dnn/.gitignore b/samples/data/dnn/.gitignore deleted file mode 100644 index be7186603d..0000000000 --- a/samples/data/dnn/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.caffemodel diff --git a/samples/data/dnn/MobileNetSSD_300x300.prototxt b/samples/data/dnn/MobileNetSSD_300x300.prototxt deleted file mode 100644 index def19412b6..0000000000 --- a/samples/data/dnn/MobileNetSSD_300x300.prototxt +++ /dev/null @@ -1,3102 +0,0 @@ -name: "MobileNet-SSD" -input: "data" -input_shape { - dim: 1 - dim: 3 - dim: 300 - dim: 300 -} -layer { - name: "conv0" - type: "Convolution" - bottom: "data" - top: "conv0" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 32 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv0/bn" - type: "BatchNorm" - bottom: "conv0" - top: "conv0" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv0/scale" - type: "Scale" - bottom: "conv0" - top: "conv0" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv0/relu" - type: "ReLU" - bottom: "conv0" - top: "conv0" -} -layer { - name: "conv1/dw" - type: "Convolution" - bottom: "conv0" - top: "conv1/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 32 - bias_term: false - pad: 1 - kernel_size: 3 - group: 32 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv1/dw/bn" - type: "BatchNorm" - bottom: "conv1/dw" - top: "conv1/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv1/dw/scale" - type: "Scale" - bottom: "conv1/dw" - top: "conv1/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv1/dw/relu" - type: "ReLU" - bottom: "conv1/dw" - top: "conv1/dw" -} -layer { - name: "conv1" - type: "Convolution" - bottom: "conv1/dw" - top: "conv1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 64 - bias_term: false - kernel_size: 1 - 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 - } -} -layer { - name: "conv1/scale" - type: "Scale" - bottom: "conv1" - top: "conv1" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv1/relu" - type: "ReLU" - bottom: "conv1" - top: "conv1" -} -layer { - name: "conv2/dw" - type: "Convolution" - bottom: "conv1" - top: "conv2/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - group: 64 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv2/dw/bn" - type: "BatchNorm" - bottom: "conv2/dw" - top: "conv2/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv2/dw/scale" - type: "Scale" - bottom: "conv2/dw" - top: "conv2/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv2/dw/relu" - type: "ReLU" - bottom: "conv2/dw" - top: "conv2/dw" -} -layer { - name: "conv2" - type: "Convolution" - bottom: "conv2/dw" - top: "conv2" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv2/bn" - type: "BatchNorm" - bottom: "conv2" - top: "conv2" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv2/scale" - type: "Scale" - bottom: "conv2" - top: "conv2" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv2/relu" - type: "ReLU" - bottom: "conv2" - top: "conv2" -} -layer { - name: "conv3/dw" - type: "Convolution" - bottom: "conv2" - top: "conv3/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - group: 128 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv3/dw/bn" - type: "BatchNorm" - bottom: "conv3/dw" - top: "conv3/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv3/dw/scale" - type: "Scale" - bottom: "conv3/dw" - top: "conv3/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv3/dw/relu" - type: "ReLU" - bottom: "conv3/dw" - top: "conv3/dw" -} -layer { - name: "conv3" - type: "Convolution" - bottom: "conv3/dw" - top: "conv3" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv3/bn" - type: "BatchNorm" - bottom: "conv3" - top: "conv3" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv3/scale" - type: "Scale" - bottom: "conv3" - top: "conv3" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv3/relu" - type: "ReLU" - bottom: "conv3" - top: "conv3" -} -layer { - name: "conv4/dw" - type: "Convolution" - bottom: "conv3" - top: "conv4/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - group: 128 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv4/dw/bn" - type: "BatchNorm" - bottom: "conv4/dw" - top: "conv4/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv4/dw/scale" - type: "Scale" - bottom: "conv4/dw" - top: "conv4/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv4/dw/relu" - type: "ReLU" - bottom: "conv4/dw" - top: "conv4/dw" -} -layer { - name: "conv4" - type: "Convolution" - bottom: "conv4/dw" - top: "conv4" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv4/bn" - type: "BatchNorm" - bottom: "conv4" - top: "conv4" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv4/scale" - type: "Scale" - bottom: "conv4" - top: "conv4" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv4/relu" - type: "ReLU" - bottom: "conv4" - top: "conv4" -} -layer { - name: "conv5/dw" - type: "Convolution" - bottom: "conv4" - top: "conv5/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - group: 256 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv5/dw/bn" - type: "BatchNorm" - bottom: "conv5/dw" - top: "conv5/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv5/dw/scale" - type: "Scale" - bottom: "conv5/dw" - top: "conv5/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv5/dw/relu" - type: "ReLU" - bottom: "conv5/dw" - top: "conv5/dw" -} -layer { - name: "conv5" - type: "Convolution" - bottom: "conv5/dw" - top: "conv5" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv5/bn" - type: "BatchNorm" - bottom: "conv5" - top: "conv5" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv5/scale" - type: "Scale" - bottom: "conv5" - top: "conv5" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv5/relu" - type: "ReLU" - bottom: "conv5" - top: "conv5" -} -layer { - name: "conv6/dw" - type: "Convolution" - bottom: "conv5" - top: "conv6/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - group: 256 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv6/dw/bn" - type: "BatchNorm" - bottom: "conv6/dw" - top: "conv6/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv6/dw/scale" - type: "Scale" - bottom: "conv6/dw" - top: "conv6/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv6/dw/relu" - type: "ReLU" - bottom: "conv6/dw" - top: "conv6/dw" -} -layer { - name: "conv6" - type: "Convolution" - bottom: "conv6/dw" - top: "conv6" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv6/bn" - type: "BatchNorm" - bottom: "conv6" - top: "conv6" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv6/scale" - type: "Scale" - bottom: "conv6" - top: "conv6" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv6/relu" - type: "ReLU" - bottom: "conv6" - top: "conv6" -} -layer { - name: "conv7/dw" - type: "Convolution" - bottom: "conv6" - top: "conv7/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - group: 512 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv7/dw/bn" - type: "BatchNorm" - bottom: "conv7/dw" - top: "conv7/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv7/dw/scale" - type: "Scale" - bottom: "conv7/dw" - top: "conv7/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv7/dw/relu" - type: "ReLU" - bottom: "conv7/dw" - top: "conv7/dw" -} -layer { - name: "conv7" - type: "Convolution" - bottom: "conv7/dw" - top: "conv7" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv7/bn" - type: "BatchNorm" - bottom: "conv7" - top: "conv7" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv7/scale" - type: "Scale" - bottom: "conv7" - top: "conv7" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv7/relu" - type: "ReLU" - bottom: "conv7" - top: "conv7" -} -layer { - name: "conv8/dw" - type: "Convolution" - bottom: "conv7" - top: "conv8/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - group: 512 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv8/dw/bn" - type: "BatchNorm" - bottom: "conv8/dw" - top: "conv8/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv8/dw/scale" - type: "Scale" - bottom: "conv8/dw" - top: "conv8/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv8/dw/relu" - type: "ReLU" - bottom: "conv8/dw" - top: "conv8/dw" -} -layer { - name: "conv8" - type: "Convolution" - bottom: "conv8/dw" - top: "conv8" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv8/bn" - type: "BatchNorm" - bottom: "conv8" - top: "conv8" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv8/scale" - type: "Scale" - bottom: "conv8" - top: "conv8" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv8/relu" - type: "ReLU" - bottom: "conv8" - top: "conv8" -} -layer { - name: "conv9/dw" - type: "Convolution" - bottom: "conv8" - top: "conv9/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - group: 512 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv9/dw/bn" - type: "BatchNorm" - bottom: "conv9/dw" - top: "conv9/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv9/dw/scale" - type: "Scale" - bottom: "conv9/dw" - top: "conv9/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv9/dw/relu" - type: "ReLU" - bottom: "conv9/dw" - top: "conv9/dw" -} -layer { - name: "conv9" - type: "Convolution" - bottom: "conv9/dw" - top: "conv9" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv9/bn" - type: "BatchNorm" - bottom: "conv9" - top: "conv9" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv9/scale" - type: "Scale" - bottom: "conv9" - top: "conv9" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv9/relu" - type: "ReLU" - bottom: "conv9" - top: "conv9" -} -layer { - name: "conv10/dw" - type: "Convolution" - bottom: "conv9" - top: "conv10/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - group: 512 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv10/dw/bn" - type: "BatchNorm" - bottom: "conv10/dw" - top: "conv10/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv10/dw/scale" - type: "Scale" - bottom: "conv10/dw" - top: "conv10/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv10/dw/relu" - type: "ReLU" - bottom: "conv10/dw" - top: "conv10/dw" -} -layer { - name: "conv10" - type: "Convolution" - bottom: "conv10/dw" - top: "conv10" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv10/bn" - type: "BatchNorm" - bottom: "conv10" - top: "conv10" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv10/scale" - type: "Scale" - bottom: "conv10" - top: "conv10" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv10/relu" - type: "ReLU" - bottom: "conv10" - top: "conv10" -} -layer { - name: "conv11/dw" - type: "Convolution" - bottom: "conv10" - top: "conv11/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - group: 512 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv11/dw/bn" - type: "BatchNorm" - bottom: "conv11/dw" - top: "conv11/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv11/dw/scale" - type: "Scale" - bottom: "conv11/dw" - top: "conv11/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv11/dw/relu" - type: "ReLU" - bottom: "conv11/dw" - top: "conv11/dw" -} -layer { - name: "conv11" - type: "Convolution" - bottom: "conv11/dw" - top: "conv11" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv11/bn" - type: "BatchNorm" - bottom: "conv11" - top: "conv11" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv11/scale" - type: "Scale" - bottom: "conv11" - top: "conv11" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv11/relu" - type: "ReLU" - bottom: "conv11" - top: "conv11" -} -layer { - name: "conv12/dw" - type: "Convolution" - bottom: "conv11" - top: "conv12/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - group: 512 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv12/dw/bn" - type: "BatchNorm" - bottom: "conv12/dw" - top: "conv12/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv12/dw/scale" - type: "Scale" - bottom: "conv12/dw" - top: "conv12/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv12/dw/relu" - type: "ReLU" - bottom: "conv12/dw" - top: "conv12/dw" -} -layer { - name: "conv12" - type: "Convolution" - bottom: "conv12/dw" - top: "conv12" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 1024 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv12/bn" - type: "BatchNorm" - bottom: "conv12" - top: "conv12" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv12/scale" - type: "Scale" - bottom: "conv12" - top: "conv12" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv12/relu" - type: "ReLU" - bottom: "conv12" - top: "conv12" -} -layer { - name: "conv13/dw" - type: "Convolution" - bottom: "conv12" - top: "conv13/dw" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 1024 - bias_term: false - pad: 1 - kernel_size: 3 - group: 1024 - engine: CAFFE - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv13/dw/bn" - type: "BatchNorm" - bottom: "conv13/dw" - top: "conv13/dw" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv13/dw/scale" - type: "Scale" - bottom: "conv13/dw" - top: "conv13/dw" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv13/dw/relu" - type: "ReLU" - bottom: "conv13/dw" - top: "conv13/dw" -} -layer { - name: "conv13" - type: "Convolution" - bottom: "conv13/dw" - top: "conv13" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 1024 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv13/bn" - type: "BatchNorm" - bottom: "conv13" - top: "conv13" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv13/scale" - type: "Scale" - bottom: "conv13" - top: "conv13" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv13/relu" - type: "ReLU" - bottom: "conv13" - top: "conv13" -} -layer { - name: "conv14_1" - type: "Convolution" - bottom: "conv13" - top: "conv14_1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv14_1/bn" - type: "BatchNorm" - bottom: "conv14_1" - top: "conv14_1" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv14_1/scale" - type: "Scale" - bottom: "conv14_1" - top: "conv14_1" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv14_1/relu" - type: "ReLU" - bottom: "conv14_1" - top: "conv14_1" -} -layer { - name: "conv14_2" - type: "Convolution" - bottom: "conv14_1" - top: "conv14_2" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv14_2/bn" - type: "BatchNorm" - bottom: "conv14_2" - top: "conv14_2" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv14_2/scale" - type: "Scale" - bottom: "conv14_2" - top: "conv14_2" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv14_2/relu" - type: "ReLU" - bottom: "conv14_2" - top: "conv14_2" -} -layer { - name: "conv15_1" - type: "Convolution" - bottom: "conv14_2" - top: "conv15_1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv15_1/bn" - type: "BatchNorm" - bottom: "conv15_1" - top: "conv15_1" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv15_1/scale" - type: "Scale" - bottom: "conv15_1" - top: "conv15_1" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv15_1/relu" - type: "ReLU" - bottom: "conv15_1" - top: "conv15_1" -} -layer { - name: "conv15_2" - type: "Convolution" - bottom: "conv15_1" - top: "conv15_2" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv15_2/bn" - type: "BatchNorm" - bottom: "conv15_2" - top: "conv15_2" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv15_2/scale" - type: "Scale" - bottom: "conv15_2" - top: "conv15_2" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv15_2/relu" - type: "ReLU" - bottom: "conv15_2" - top: "conv15_2" -} -layer { - name: "conv16_1" - type: "Convolution" - bottom: "conv15_2" - top: "conv16_1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv16_1/bn" - type: "BatchNorm" - bottom: "conv16_1" - top: "conv16_1" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv16_1/scale" - type: "Scale" - bottom: "conv16_1" - top: "conv16_1" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv16_1/relu" - type: "ReLU" - bottom: "conv16_1" - top: "conv16_1" -} -layer { - name: "conv16_2" - type: "Convolution" - bottom: "conv16_1" - top: "conv16_2" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv16_2/bn" - type: "BatchNorm" - bottom: "conv16_2" - top: "conv16_2" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv16_2/scale" - type: "Scale" - bottom: "conv16_2" - top: "conv16_2" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv16_2/relu" - type: "ReLU" - bottom: "conv16_2" - top: "conv16_2" -} -layer { - name: "conv17_1" - type: "Convolution" - bottom: "conv16_2" - top: "conv17_1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 64 - bias_term: false - kernel_size: 1 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv17_1/bn" - type: "BatchNorm" - bottom: "conv17_1" - top: "conv17_1" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv17_1/scale" - type: "Scale" - bottom: "conv17_1" - top: "conv17_1" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv17_1/relu" - type: "ReLU" - bottom: "conv17_1" - top: "conv17_1" -} -layer { - name: "conv17_2" - type: "Convolution" - bottom: "conv17_1" - top: "conv17_2" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - } -} -layer { - name: "conv17_2/bn" - type: "BatchNorm" - bottom: "conv17_2" - top: "conv17_2" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } -} -layer { - name: "conv17_2/scale" - type: "Scale" - bottom: "conv17_2" - top: "conv17_2" - param { - lr_mult: 0.1 - decay_mult: 0.0 - } - param { - lr_mult: 0.2 - decay_mult: 0.0 - } - scale_param { - filler { - value: 1 - } - bias_term: true - bias_filler { - value: 0 - } - } -} -layer { - name: "conv17_2/relu" - type: "ReLU" - bottom: "conv17_2" - top: "conv17_2" -} -layer { - name: "conv11_mbox_loc" - type: "Convolution" - bottom: "conv11" - top: "conv11_mbox_loc" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 0.0 - } - convolution_param { - num_output: 12 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv11_mbox_loc_perm" - type: "Permute" - bottom: "conv11_mbox_loc" - top: "conv11_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv11_mbox_loc_flat" - type: "Flatten" - bottom: "conv11_mbox_loc_perm" - top: "conv11_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv11_mbox_conf" - type: "Convolution" - bottom: "conv11" - top: "conv11_mbox_conf" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 0.0 - } - convolution_param { - num_output: 63 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv11_mbox_conf_perm" - type: "Permute" - bottom: "conv11_mbox_conf" - top: "conv11_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv11_mbox_conf_flat" - type: "Flatten" - bottom: "conv11_mbox_conf_perm" - top: "conv11_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv11_mbox_priorbox" - type: "PriorBox" - bottom: "conv11" - bottom: "data" - top: "conv11_mbox_priorbox" - prior_box_param { - min_size: 60.0 - aspect_ratio: 2.0 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - offset: 0.5 - } -} -layer { - name: "conv13_mbox_loc" - type: "Convolution" - bottom: "conv13" - top: "conv13_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 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv13_mbox_loc_perm" - type: "Permute" - bottom: "conv13_mbox_loc" - top: "conv13_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv13_mbox_loc_flat" - type: "Flatten" - bottom: "conv13_mbox_loc_perm" - top: "conv13_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv13_mbox_conf" - type: "Convolution" - bottom: "conv13" - top: "conv13_mbox_conf" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 0.0 - } - convolution_param { - num_output: 126 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv13_mbox_conf_perm" - type: "Permute" - bottom: "conv13_mbox_conf" - top: "conv13_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv13_mbox_conf_flat" - type: "Flatten" - bottom: "conv13_mbox_conf_perm" - top: "conv13_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv13_mbox_priorbox" - type: "PriorBox" - bottom: "conv13" - bottom: "data" - top: "conv13_mbox_priorbox" - prior_box_param { - min_size: 105.0 - max_size: 150.0 - aspect_ratio: 2.0 - aspect_ratio: 3.0 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - offset: 0.5 - } -} -layer { - name: "conv14_2_mbox_loc" - type: "Convolution" - bottom: "conv14_2" - top: "conv14_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 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv14_2_mbox_loc_perm" - type: "Permute" - bottom: "conv14_2_mbox_loc" - top: "conv14_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv14_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv14_2_mbox_loc_perm" - top: "conv14_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv14_2_mbox_conf" - type: "Convolution" - bottom: "conv14_2" - top: "conv14_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: 126 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv14_2_mbox_conf_perm" - type: "Permute" - bottom: "conv14_2_mbox_conf" - top: "conv14_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv14_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv14_2_mbox_conf_perm" - top: "conv14_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv14_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv14_2" - bottom: "data" - top: "conv14_2_mbox_priorbox" - prior_box_param { - min_size: 150.0 - max_size: 195.0 - aspect_ratio: 2.0 - aspect_ratio: 3.0 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - offset: 0.5 - } -} -layer { - name: "conv15_2_mbox_loc" - type: "Convolution" - bottom: "conv15_2" - top: "conv15_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 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv15_2_mbox_loc_perm" - type: "Permute" - bottom: "conv15_2_mbox_loc" - top: "conv15_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv15_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv15_2_mbox_loc_perm" - top: "conv15_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv15_2_mbox_conf" - type: "Convolution" - bottom: "conv15_2" - top: "conv15_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: 126 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv15_2_mbox_conf_perm" - type: "Permute" - bottom: "conv15_2_mbox_conf" - top: "conv15_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv15_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv15_2_mbox_conf_perm" - top: "conv15_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv15_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv15_2" - bottom: "data" - top: "conv15_2_mbox_priorbox" - prior_box_param { - min_size: 195.0 - max_size: 240.0 - aspect_ratio: 2.0 - aspect_ratio: 3.0 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - offset: 0.5 - } -} -layer { - name: "conv16_2_mbox_loc" - type: "Convolution" - bottom: "conv16_2" - top: "conv16_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 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv16_2_mbox_loc_perm" - type: "Permute" - bottom: "conv16_2_mbox_loc" - top: "conv16_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv16_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv16_2_mbox_loc_perm" - top: "conv16_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv16_2_mbox_conf" - type: "Convolution" - bottom: "conv16_2" - top: "conv16_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: 126 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv16_2_mbox_conf_perm" - type: "Permute" - bottom: "conv16_2_mbox_conf" - top: "conv16_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv16_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv16_2_mbox_conf_perm" - top: "conv16_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv16_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv16_2" - bottom: "data" - top: "conv16_2_mbox_priorbox" - prior_box_param { - min_size: 240.0 - max_size: 285.0 - aspect_ratio: 2.0 - aspect_ratio: 3.0 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - offset: 0.5 - } -} -layer { - name: "conv17_2_mbox_loc" - type: "Convolution" - bottom: "conv17_2" - top: "conv17_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 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv17_2_mbox_loc_perm" - type: "Permute" - bottom: "conv17_2_mbox_loc" - top: "conv17_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv17_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv17_2_mbox_loc_perm" - top: "conv17_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv17_2_mbox_conf" - type: "Convolution" - bottom: "conv17_2" - top: "conv17_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: 126 - kernel_size: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv17_2_mbox_conf_perm" - type: "Permute" - bottom: "conv17_2_mbox_conf" - top: "conv17_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv17_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv17_2_mbox_conf_perm" - top: "conv17_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv17_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv17_2" - bottom: "data" - top: "conv17_2_mbox_priorbox" - prior_box_param { - min_size: 285.0 - max_size: 300.0 - aspect_ratio: 2.0 - aspect_ratio: 3.0 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - offset: 0.5 - } -} -layer { - name: "mbox_loc" - type: "Concat" - bottom: "conv11_mbox_loc_flat" - bottom: "conv13_mbox_loc_flat" - bottom: "conv14_2_mbox_loc_flat" - bottom: "conv15_2_mbox_loc_flat" - bottom: "conv16_2_mbox_loc_flat" - bottom: "conv17_2_mbox_loc_flat" - top: "mbox_loc" - concat_param { - axis: 1 - } -} -layer { - name: "mbox_conf" - type: "Concat" - bottom: "conv11_mbox_conf_flat" - bottom: "conv13_mbox_conf_flat" - bottom: "conv14_2_mbox_conf_flat" - bottom: "conv15_2_mbox_conf_flat" - bottom: "conv16_2_mbox_conf_flat" - bottom: "conv17_2_mbox_conf_flat" - top: "mbox_conf" - concat_param { - axis: 1 - } -} -layer { - name: "mbox_priorbox" - type: "Concat" - bottom: "conv11_mbox_priorbox" - bottom: "conv13_mbox_priorbox" - bottom: "conv14_2_mbox_priorbox" - bottom: "conv15_2_mbox_priorbox" - bottom: "conv16_2_mbox_priorbox" - bottom: "conv17_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: 21 - } - } -} -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: 21 - share_location: true - background_label_id: 0 - nms_param { - nms_threshold: 0.45 - top_k: 100 - } - code_type: CENTER_SIZE - keep_top_k: 100 - confidence_threshold: 0.25 - } -} \ No newline at end of file diff --git a/samples/data/dnn/VGG_VOC0712_SSD_300x300_iter_60000.prototxt b/samples/data/dnn/VGG_VOC0712_SSD_300x300_iter_60000.prototxt deleted file mode 100644 index 77a2365553..0000000000 --- a/samples/data/dnn/VGG_VOC0712_SSD_300x300_iter_60000.prototxt +++ /dev/null @@ -1,1546 +0,0 @@ -name: "VGG_VOC0712_SSD_300x300_deploy" -input: "data" -input_dim: 1 -input_dim: 3 -input_dim: 300 -input_dim: 300 -layer { - name: "conv1_1" - type: "Convolution" - bottom: "data" - top: "conv1_1" - param { - lr_mult: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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: 0 - decay_mult: 0 - } - param { - lr_mult: 0 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu3_1" - type: "ReLU" - bottom: "conv3_1" - top: "conv3_1" -} -layer { - name: "conv3_2" - type: "Convolution" - bottom: "conv3_1" - top: "conv3_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu3_2" - type: "ReLU" - bottom: "conv3_2" - top: "conv3_2" -} -layer { - name: "conv3_3" - type: "Convolution" - bottom: "conv3_2" - top: "conv3_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu4_1" - type: "ReLU" - bottom: "conv4_1" - top: "conv4_1" -} -layer { - name: "conv4_2" - type: "Convolution" - bottom: "conv4_1" - top: "conv4_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu4_2" - type: "ReLU" - bottom: "conv4_2" - top: "conv4_2" -} -layer { - name: "conv4_3" - type: "Convolution" - bottom: "conv4_2" - top: "conv4_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu5_1" - type: "ReLU" - bottom: "conv5_1" - top: "conv5_1" -} -layer { - name: "conv5_2" - type: "Convolution" - bottom: "conv5_1" - top: "conv5_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu5_2" - type: "ReLU" - bottom: "conv5_2" - top: "conv5_2" -} -layer { - name: "conv5_3" - type: "Convolution" - bottom: "conv5_2" - top: "conv5_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu5_3" - type: "ReLU" - bottom: "conv5_3" - top: "conv5_3" -} -layer { - name: "pool5" - type: "Pooling" - bottom: "conv5_3" - top: "pool5" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "fc6" - type: "Convolution" - bottom: "pool5" - top: "fc6" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 1024 - pad: 6 - kernel_size: 3 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - dilation: 6 - } -} -layer { - name: "relu6" - type: "ReLU" - bottom: "fc6" - top: "fc6" -} -layer { - name: "fc7" - type: "Convolution" - bottom: "fc6" - top: "fc7" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 1024 - kernel_size: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "relu7" - type: "ReLU" - bottom: "fc7" - top: "fc7" -} -layer { - name: "conv6_1" - type: "Convolution" - bottom: "fc7" - top: "conv6_1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv8_2_relu" - type: "ReLU" - bottom: "conv8_2" - top: "conv8_2" -} -layer { - name: "pool6" - type: "Pooling" - bottom: "conv8_2" - top: "pool6" - pooling_param { - pool: AVE - global_pooling: true - } -} -layer { - name: "conv4_3_norm" - type: "NormalizeBBox" - bottom: "conv4_3" - top: "conv4_3_norm" - normalize_bbox_param { - across_spatial: false - scale_filler { - type: "constant" - value: 20 - } - 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 12 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 63 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - aspect_ratio: 2 - flip: true - clip: true - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - } -} -layer { - name: "fc7_mbox_loc" - type: "Convolution" - bottom: "fc7" - top: "fc7_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "fc7_mbox_loc_perm" - type: "Permute" - bottom: "fc7_mbox_loc" - top: "fc7_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "fc7_mbox_loc_flat" - type: "Flatten" - bottom: "fc7_mbox_loc_perm" - top: "fc7_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "fc7_mbox_conf" - type: "Convolution" - bottom: "fc7" - top: "fc7_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "fc7_mbox_conf_perm" - type: "Permute" - bottom: "fc7_mbox_conf" - top: "fc7_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "fc7_mbox_conf_flat" - type: "Flatten" - bottom: "fc7_mbox_conf_perm" - top: "fc7_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "fc7_mbox_priorbox" - type: "PriorBox" - bottom: "fc7" - bottom: "data" - top: "fc7_mbox_priorbox" - prior_box_param { - min_size: 60.0 - max_size: 114.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: true - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - } -} -layer { - name: "conv6_2_mbox_loc" - type: "Convolution" - bottom: "conv6_2" - top: "conv6_2_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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: 114.0 - max_size: 168.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: true - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - } -} -layer { - name: "conv7_2_mbox_loc" - type: "Convolution" - bottom: "conv7_2" - top: "conv7_2_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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: 168.0 - max_size: 222.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: true - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - } -} -layer { - name: "conv8_2_mbox_loc" - type: "Convolution" - bottom: "conv8_2" - top: "conv8_2_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 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: 222.0 - max_size: 276.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: true - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - } -} -layer { - name: "pool6_mbox_loc" - type: "Convolution" - bottom: "pool6" - top: "pool6_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "pool6_mbox_loc_perm" - type: "Permute" - bottom: "pool6_mbox_loc" - top: "pool6_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "pool6_mbox_loc_flat" - type: "Flatten" - bottom: "pool6_mbox_loc_perm" - top: "pool6_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "pool6_mbox_conf" - type: "Convolution" - bottom: "pool6" - top: "pool6_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "pool6_mbox_conf_perm" - type: "Permute" - bottom: "pool6_mbox_conf" - top: "pool6_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "pool6_mbox_conf_flat" - type: "Flatten" - bottom: "pool6_mbox_conf_perm" - top: "pool6_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "pool6_mbox_priorbox" - type: "PriorBox" - bottom: "pool6" - bottom: "data" - top: "pool6_mbox_priorbox" - prior_box_param { - min_size: 276.0 - max_size: 330.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: true - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - } -} -layer { - name: "mbox_loc" - type: "Concat" - bottom: "conv4_3_norm_mbox_loc_flat" - bottom: "fc7_mbox_loc_flat" - bottom: "conv6_2_mbox_loc_flat" - bottom: "conv7_2_mbox_loc_flat" - bottom: "conv8_2_mbox_loc_flat" - bottom: "pool6_mbox_loc_flat" - top: "mbox_loc" - concat_param { - axis: 1 - } -} -layer { - name: "mbox_conf" - type: "Concat" - bottom: "conv4_3_norm_mbox_conf_flat" - bottom: "fc7_mbox_conf_flat" - bottom: "conv6_2_mbox_conf_flat" - bottom: "conv7_2_mbox_conf_flat" - bottom: "conv8_2_mbox_conf_flat" - bottom: "pool6_mbox_conf_flat" - top: "mbox_conf" - concat_param { - axis: 1 - } -} -layer { - name: "mbox_priorbox" - type: "Concat" - bottom: "conv4_3_norm_mbox_priorbox" - bottom: "fc7_mbox_priorbox" - bottom: "conv6_2_mbox_priorbox" - bottom: "conv7_2_mbox_priorbox" - bottom: "conv8_2_mbox_priorbox" - bottom: "pool6_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: 21 - } - } -} -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: 21 - share_location: true - background_label_id: 0 - nms_threshold: 0.45 - top_k: 400 - code_type: CENTER_SIZE - keep_top_k: 200 - confidence_threshold: 0.01 - } -} diff --git a/samples/data/dnn/bvlc_googlenet.prototxt b/samples/data/dnn/bvlc_googlenet.prototxt deleted file mode 100644 index 4648bf26ef..0000000000 --- a/samples/data/dnn/bvlc_googlenet.prototxt +++ /dev/null @@ -1,2156 +0,0 @@ -name: "GoogleNet" -input: "data" -input_dim: 10 -input_dim: 3 -input_dim: 224 -input_dim: 224 -layer { - name: "conv1/7x7_s2" - type: "Convolution" - bottom: "data" - top: "conv1/7x7_s2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 3 - kernel_size: 7 - stride: 2 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "conv1/relu_7x7" - type: "ReLU" - bottom: "conv1/7x7_s2" - top: "conv1/7x7_s2" -} -layer { - name: "pool1/3x3_s2" - type: "Pooling" - bottom: "conv1/7x7_s2" - top: "pool1/3x3_s2" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 2 - } -} -layer { - name: "pool1/norm1" - type: "LRN" - bottom: "pool1/3x3_s2" - top: "pool1/norm1" - lrn_param { - local_size: 5 - alpha: 0.0001 - beta: 0.75 - } -} -layer { - name: "conv2/3x3_reduce" - type: "Convolution" - bottom: "pool1/norm1" - top: "conv2/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "conv2/relu_3x3_reduce" - type: "ReLU" - bottom: "conv2/3x3_reduce" - top: "conv2/3x3_reduce" -} -layer { - name: "conv2/3x3" - type: "Convolution" - bottom: "conv2/3x3_reduce" - top: "conv2/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 192 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "conv2/relu_3x3" - type: "ReLU" - bottom: "conv2/3x3" - top: "conv2/3x3" -} -layer { - name: "conv2/norm2" - type: "LRN" - bottom: "conv2/3x3" - top: "conv2/norm2" - lrn_param { - local_size: 5 - alpha: 0.0001 - beta: 0.75 - } -} -layer { - name: "pool2/3x3_s2" - type: "Pooling" - bottom: "conv2/norm2" - top: "pool2/3x3_s2" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 2 - } -} -layer { - name: "inception_3a/1x1" - type: "Convolution" - bottom: "pool2/3x3_s2" - top: "inception_3a/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3a/relu_1x1" - type: "ReLU" - bottom: "inception_3a/1x1" - top: "inception_3a/1x1" -} -layer { - name: "inception_3a/3x3_reduce" - type: "Convolution" - bottom: "pool2/3x3_s2" - top: "inception_3a/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 96 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3a/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_3a/3x3_reduce" - top: "inception_3a/3x3_reduce" -} -layer { - name: "inception_3a/3x3" - type: "Convolution" - bottom: "inception_3a/3x3_reduce" - top: "inception_3a/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3a/relu_3x3" - type: "ReLU" - bottom: "inception_3a/3x3" - top: "inception_3a/3x3" -} -layer { - name: "inception_3a/5x5_reduce" - type: "Convolution" - bottom: "pool2/3x3_s2" - top: "inception_3a/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 16 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3a/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_3a/5x5_reduce" - top: "inception_3a/5x5_reduce" -} -layer { - name: "inception_3a/5x5" - type: "Convolution" - bottom: "inception_3a/5x5_reduce" - top: "inception_3a/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 32 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3a/relu_5x5" - type: "ReLU" - bottom: "inception_3a/5x5" - top: "inception_3a/5x5" -} -layer { - name: "inception_3a/pool" - type: "Pooling" - bottom: "pool2/3x3_s2" - top: "inception_3a/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_3a/pool_proj" - type: "Convolution" - bottom: "inception_3a/pool" - top: "inception_3a/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 32 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3a/relu_pool_proj" - type: "ReLU" - bottom: "inception_3a/pool_proj" - top: "inception_3a/pool_proj" -} -layer { - name: "inception_3a/output" - type: "Concat" - bottom: "inception_3a/1x1" - bottom: "inception_3a/3x3" - bottom: "inception_3a/5x5" - bottom: "inception_3a/pool_proj" - top: "inception_3a/output" -} -layer { - name: "inception_3b/1x1" - type: "Convolution" - bottom: "inception_3a/output" - top: "inception_3b/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3b/relu_1x1" - type: "ReLU" - bottom: "inception_3b/1x1" - top: "inception_3b/1x1" -} -layer { - name: "inception_3b/3x3_reduce" - type: "Convolution" - bottom: "inception_3a/output" - top: "inception_3b/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3b/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_3b/3x3_reduce" - top: "inception_3b/3x3_reduce" -} -layer { - name: "inception_3b/3x3" - type: "Convolution" - bottom: "inception_3b/3x3_reduce" - top: "inception_3b/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 192 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3b/relu_3x3" - type: "ReLU" - bottom: "inception_3b/3x3" - top: "inception_3b/3x3" -} -layer { - name: "inception_3b/5x5_reduce" - type: "Convolution" - bottom: "inception_3a/output" - top: "inception_3b/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 32 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3b/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_3b/5x5_reduce" - top: "inception_3b/5x5_reduce" -} -layer { - name: "inception_3b/5x5" - type: "Convolution" - bottom: "inception_3b/5x5_reduce" - top: "inception_3b/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 96 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3b/relu_5x5" - type: "ReLU" - bottom: "inception_3b/5x5" - top: "inception_3b/5x5" -} -layer { - name: "inception_3b/pool" - type: "Pooling" - bottom: "inception_3a/output" - top: "inception_3b/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_3b/pool_proj" - type: "Convolution" - bottom: "inception_3b/pool" - top: "inception_3b/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_3b/relu_pool_proj" - type: "ReLU" - bottom: "inception_3b/pool_proj" - top: "inception_3b/pool_proj" -} -layer { - name: "inception_3b/output" - type: "Concat" - bottom: "inception_3b/1x1" - bottom: "inception_3b/3x3" - bottom: "inception_3b/5x5" - bottom: "inception_3b/pool_proj" - top: "inception_3b/output" -} -layer { - name: "pool3/3x3_s2" - type: "Pooling" - bottom: "inception_3b/output" - top: "pool3/3x3_s2" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 2 - } -} -layer { - name: "inception_4a/1x1" - type: "Convolution" - bottom: "pool3/3x3_s2" - top: "inception_4a/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 192 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4a/relu_1x1" - type: "ReLU" - bottom: "inception_4a/1x1" - top: "inception_4a/1x1" -} -layer { - name: "inception_4a/3x3_reduce" - type: "Convolution" - bottom: "pool3/3x3_s2" - top: "inception_4a/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 96 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4a/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_4a/3x3_reduce" - top: "inception_4a/3x3_reduce" -} -layer { - name: "inception_4a/3x3" - type: "Convolution" - bottom: "inception_4a/3x3_reduce" - top: "inception_4a/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 208 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4a/relu_3x3" - type: "ReLU" - bottom: "inception_4a/3x3" - top: "inception_4a/3x3" -} -layer { - name: "inception_4a/5x5_reduce" - type: "Convolution" - bottom: "pool3/3x3_s2" - top: "inception_4a/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 16 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4a/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_4a/5x5_reduce" - top: "inception_4a/5x5_reduce" -} -layer { - name: "inception_4a/5x5" - type: "Convolution" - bottom: "inception_4a/5x5_reduce" - top: "inception_4a/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 48 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4a/relu_5x5" - type: "ReLU" - bottom: "inception_4a/5x5" - top: "inception_4a/5x5" -} -layer { - name: "inception_4a/pool" - type: "Pooling" - bottom: "pool3/3x3_s2" - top: "inception_4a/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_4a/pool_proj" - type: "Convolution" - bottom: "inception_4a/pool" - top: "inception_4a/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4a/relu_pool_proj" - type: "ReLU" - bottom: "inception_4a/pool_proj" - top: "inception_4a/pool_proj" -} -layer { - name: "inception_4a/output" - type: "Concat" - bottom: "inception_4a/1x1" - bottom: "inception_4a/3x3" - bottom: "inception_4a/5x5" - bottom: "inception_4a/pool_proj" - top: "inception_4a/output" -} -layer { - name: "inception_4b/1x1" - type: "Convolution" - bottom: "inception_4a/output" - top: "inception_4b/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 160 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4b/relu_1x1" - type: "ReLU" - bottom: "inception_4b/1x1" - top: "inception_4b/1x1" -} -layer { - name: "inception_4b/3x3_reduce" - type: "Convolution" - bottom: "inception_4a/output" - top: "inception_4b/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 112 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4b/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_4b/3x3_reduce" - top: "inception_4b/3x3_reduce" -} -layer { - name: "inception_4b/3x3" - type: "Convolution" - bottom: "inception_4b/3x3_reduce" - top: "inception_4b/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 224 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4b/relu_3x3" - type: "ReLU" - bottom: "inception_4b/3x3" - top: "inception_4b/3x3" -} -layer { - name: "inception_4b/5x5_reduce" - type: "Convolution" - bottom: "inception_4a/output" - top: "inception_4b/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4b/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_4b/5x5_reduce" - top: "inception_4b/5x5_reduce" -} -layer { - name: "inception_4b/5x5" - type: "Convolution" - bottom: "inception_4b/5x5_reduce" - top: "inception_4b/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4b/relu_5x5" - type: "ReLU" - bottom: "inception_4b/5x5" - top: "inception_4b/5x5" -} -layer { - name: "inception_4b/pool" - type: "Pooling" - bottom: "inception_4a/output" - top: "inception_4b/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_4b/pool_proj" - type: "Convolution" - bottom: "inception_4b/pool" - top: "inception_4b/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4b/relu_pool_proj" - type: "ReLU" - bottom: "inception_4b/pool_proj" - top: "inception_4b/pool_proj" -} -layer { - name: "inception_4b/output" - type: "Concat" - bottom: "inception_4b/1x1" - bottom: "inception_4b/3x3" - bottom: "inception_4b/5x5" - bottom: "inception_4b/pool_proj" - top: "inception_4b/output" -} -layer { - name: "inception_4c/1x1" - type: "Convolution" - bottom: "inception_4b/output" - top: "inception_4c/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4c/relu_1x1" - type: "ReLU" - bottom: "inception_4c/1x1" - top: "inception_4c/1x1" -} -layer { - name: "inception_4c/3x3_reduce" - type: "Convolution" - bottom: "inception_4b/output" - top: "inception_4c/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4c/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_4c/3x3_reduce" - top: "inception_4c/3x3_reduce" -} -layer { - name: "inception_4c/3x3" - type: "Convolution" - bottom: "inception_4c/3x3_reduce" - top: "inception_4c/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4c/relu_3x3" - type: "ReLU" - bottom: "inception_4c/3x3" - top: "inception_4c/3x3" -} -layer { - name: "inception_4c/5x5_reduce" - type: "Convolution" - bottom: "inception_4b/output" - top: "inception_4c/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4c/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_4c/5x5_reduce" - top: "inception_4c/5x5_reduce" -} -layer { - name: "inception_4c/5x5" - type: "Convolution" - bottom: "inception_4c/5x5_reduce" - top: "inception_4c/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4c/relu_5x5" - type: "ReLU" - bottom: "inception_4c/5x5" - top: "inception_4c/5x5" -} -layer { - name: "inception_4c/pool" - type: "Pooling" - bottom: "inception_4b/output" - top: "inception_4c/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_4c/pool_proj" - type: "Convolution" - bottom: "inception_4c/pool" - top: "inception_4c/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4c/relu_pool_proj" - type: "ReLU" - bottom: "inception_4c/pool_proj" - top: "inception_4c/pool_proj" -} -layer { - name: "inception_4c/output" - type: "Concat" - bottom: "inception_4c/1x1" - bottom: "inception_4c/3x3" - bottom: "inception_4c/5x5" - bottom: "inception_4c/pool_proj" - top: "inception_4c/output" -} -layer { - name: "inception_4d/1x1" - type: "Convolution" - bottom: "inception_4c/output" - top: "inception_4d/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 112 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4d/relu_1x1" - type: "ReLU" - bottom: "inception_4d/1x1" - top: "inception_4d/1x1" -} -layer { - name: "inception_4d/3x3_reduce" - type: "Convolution" - bottom: "inception_4c/output" - top: "inception_4d/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 144 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4d/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_4d/3x3_reduce" - top: "inception_4d/3x3_reduce" -} -layer { - name: "inception_4d/3x3" - type: "Convolution" - bottom: "inception_4d/3x3_reduce" - top: "inception_4d/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 288 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4d/relu_3x3" - type: "ReLU" - bottom: "inception_4d/3x3" - top: "inception_4d/3x3" -} -layer { - name: "inception_4d/5x5_reduce" - type: "Convolution" - bottom: "inception_4c/output" - top: "inception_4d/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 32 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4d/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_4d/5x5_reduce" - top: "inception_4d/5x5_reduce" -} -layer { - name: "inception_4d/5x5" - type: "Convolution" - bottom: "inception_4d/5x5_reduce" - top: "inception_4d/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4d/relu_5x5" - type: "ReLU" - bottom: "inception_4d/5x5" - top: "inception_4d/5x5" -} -layer { - name: "inception_4d/pool" - type: "Pooling" - bottom: "inception_4c/output" - top: "inception_4d/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_4d/pool_proj" - type: "Convolution" - bottom: "inception_4d/pool" - top: "inception_4d/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4d/relu_pool_proj" - type: "ReLU" - bottom: "inception_4d/pool_proj" - top: "inception_4d/pool_proj" -} -layer { - name: "inception_4d/output" - type: "Concat" - bottom: "inception_4d/1x1" - bottom: "inception_4d/3x3" - bottom: "inception_4d/5x5" - bottom: "inception_4d/pool_proj" - top: "inception_4d/output" -} -layer { - name: "inception_4e/1x1" - type: "Convolution" - bottom: "inception_4d/output" - top: "inception_4e/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4e/relu_1x1" - type: "ReLU" - bottom: "inception_4e/1x1" - top: "inception_4e/1x1" -} -layer { - name: "inception_4e/3x3_reduce" - type: "Convolution" - bottom: "inception_4d/output" - top: "inception_4e/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 160 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4e/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_4e/3x3_reduce" - top: "inception_4e/3x3_reduce" -} -layer { - name: "inception_4e/3x3" - type: "Convolution" - bottom: "inception_4e/3x3_reduce" - top: "inception_4e/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 320 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4e/relu_3x3" - type: "ReLU" - bottom: "inception_4e/3x3" - top: "inception_4e/3x3" -} -layer { - name: "inception_4e/5x5_reduce" - type: "Convolution" - bottom: "inception_4d/output" - top: "inception_4e/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 32 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4e/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_4e/5x5_reduce" - top: "inception_4e/5x5_reduce" -} -layer { - name: "inception_4e/5x5" - type: "Convolution" - bottom: "inception_4e/5x5_reduce" - top: "inception_4e/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4e/relu_5x5" - type: "ReLU" - bottom: "inception_4e/5x5" - top: "inception_4e/5x5" -} -layer { - name: "inception_4e/pool" - type: "Pooling" - bottom: "inception_4d/output" - top: "inception_4e/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_4e/pool_proj" - type: "Convolution" - bottom: "inception_4e/pool" - top: "inception_4e/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_4e/relu_pool_proj" - type: "ReLU" - bottom: "inception_4e/pool_proj" - top: "inception_4e/pool_proj" -} -layer { - name: "inception_4e/output" - type: "Concat" - bottom: "inception_4e/1x1" - bottom: "inception_4e/3x3" - bottom: "inception_4e/5x5" - bottom: "inception_4e/pool_proj" - top: "inception_4e/output" -} -layer { - name: "pool4/3x3_s2" - type: "Pooling" - bottom: "inception_4e/output" - top: "pool4/3x3_s2" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 2 - } -} -layer { - name: "inception_5a/1x1" - type: "Convolution" - bottom: "pool4/3x3_s2" - top: "inception_5a/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5a/relu_1x1" - type: "ReLU" - bottom: "inception_5a/1x1" - top: "inception_5a/1x1" -} -layer { - name: "inception_5a/3x3_reduce" - type: "Convolution" - bottom: "pool4/3x3_s2" - top: "inception_5a/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 160 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5a/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_5a/3x3_reduce" - top: "inception_5a/3x3_reduce" -} -layer { - name: "inception_5a/3x3" - type: "Convolution" - bottom: "inception_5a/3x3_reduce" - top: "inception_5a/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 320 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5a/relu_3x3" - type: "ReLU" - bottom: "inception_5a/3x3" - top: "inception_5a/3x3" -} -layer { - name: "inception_5a/5x5_reduce" - type: "Convolution" - bottom: "pool4/3x3_s2" - top: "inception_5a/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 32 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5a/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_5a/5x5_reduce" - top: "inception_5a/5x5_reduce" -} -layer { - name: "inception_5a/5x5" - type: "Convolution" - bottom: "inception_5a/5x5_reduce" - top: "inception_5a/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5a/relu_5x5" - type: "ReLU" - bottom: "inception_5a/5x5" - top: "inception_5a/5x5" -} -layer { - name: "inception_5a/pool" - type: "Pooling" - bottom: "pool4/3x3_s2" - top: "inception_5a/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_5a/pool_proj" - type: "Convolution" - bottom: "inception_5a/pool" - top: "inception_5a/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5a/relu_pool_proj" - type: "ReLU" - bottom: "inception_5a/pool_proj" - top: "inception_5a/pool_proj" -} -layer { - name: "inception_5a/output" - type: "Concat" - bottom: "inception_5a/1x1" - bottom: "inception_5a/3x3" - bottom: "inception_5a/5x5" - bottom: "inception_5a/pool_proj" - top: "inception_5a/output" -} -layer { - name: "inception_5b/1x1" - type: "Convolution" - bottom: "inception_5a/output" - top: "inception_5b/1x1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 384 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5b/relu_1x1" - type: "ReLU" - bottom: "inception_5b/1x1" - top: "inception_5b/1x1" -} -layer { - name: "inception_5b/3x3_reduce" - type: "Convolution" - bottom: "inception_5a/output" - top: "inception_5b/3x3_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 192 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.09 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5b/relu_3x3_reduce" - type: "ReLU" - bottom: "inception_5b/3x3_reduce" - top: "inception_5b/3x3_reduce" -} -layer { - name: "inception_5b/3x3" - type: "Convolution" - bottom: "inception_5b/3x3_reduce" - top: "inception_5b/3x3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 384 - pad: 1 - kernel_size: 3 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5b/relu_3x3" - type: "ReLU" - bottom: "inception_5b/3x3" - top: "inception_5b/3x3" -} -layer { - name: "inception_5b/5x5_reduce" - type: "Convolution" - bottom: "inception_5a/output" - top: "inception_5b/5x5_reduce" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 48 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.2 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5b/relu_5x5_reduce" - type: "ReLU" - bottom: "inception_5b/5x5_reduce" - top: "inception_5b/5x5_reduce" -} -layer { - name: "inception_5b/5x5" - type: "Convolution" - bottom: "inception_5b/5x5_reduce" - top: "inception_5b/5x5" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 2 - kernel_size: 5 - weight_filler { - type: "xavier" - std: 0.03 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5b/relu_5x5" - type: "ReLU" - bottom: "inception_5b/5x5" - top: "inception_5b/5x5" -} -layer { - name: "inception_5b/pool" - type: "Pooling" - bottom: "inception_5a/output" - top: "inception_5b/pool" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 1 - pad: 1 - } -} -layer { - name: "inception_5b/pool_proj" - type: "Convolution" - bottom: "inception_5b/pool" - top: "inception_5b/pool_proj" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - kernel_size: 1 - weight_filler { - type: "xavier" - std: 0.1 - } - bias_filler { - type: "constant" - value: 0.2 - } - } -} -layer { - name: "inception_5b/relu_pool_proj" - type: "ReLU" - bottom: "inception_5b/pool_proj" - top: "inception_5b/pool_proj" -} -layer { - name: "inception_5b/output" - type: "Concat" - bottom: "inception_5b/1x1" - bottom: "inception_5b/3x3" - bottom: "inception_5b/5x5" - bottom: "inception_5b/pool_proj" - top: "inception_5b/output" -} -layer { - name: "pool5/7x7_s1" - type: "Pooling" - bottom: "inception_5b/output" - top: "pool5/7x7_s1" - pooling_param { - pool: AVE - kernel_size: 7 - stride: 1 - } -} -layer { - name: "pool5/drop_7x7_s1" - type: "Dropout" - bottom: "pool5/7x7_s1" - top: "pool5/7x7_s1" - dropout_param { - dropout_ratio: 0.4 - } -} -layer { - name: "loss3/classifier" - type: "InnerProduct" - bottom: "pool5/7x7_s1" - top: "loss3/classifier" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - inner_product_param { - num_output: 1000 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "prob" - type: "Softmax" - bottom: "loss3/classifier" - top: "prob" -} diff --git a/samples/data/dnn/enet-classes.txt b/samples/data/dnn/enet-classes.txt deleted file mode 100644 index 303bf6f4c5..0000000000 --- a/samples/data/dnn/enet-classes.txt +++ /dev/null @@ -1,20 +0,0 @@ -Unlabeled 0 0 0 -Road 128 64 128 -Sidewalk 244 35 232 -Building 70 70 70 -Wall 102 102 156 -Fence 190 153 153 -Pole 153 153 153 -TrafficLight 250 170 30 -TrafficSign 220 220 0 -Vegetation 107 142 35 -Terrain 152 251 152 -Sky 70 130 180 -Person 220 20 60 -Rider 255 0 0 -Car 0 0 142 -Truck 0 0 70 -Bus 0 60 100 -Train 0 80 100 -Motorcycle 0 0 230 -Bicycle 119 11 32 \ No newline at end of file diff --git a/samples/data/dnn/fcn32s-heavy-pascal.prototxt b/samples/data/dnn/fcn32s-heavy-pascal.prototxt deleted file mode 100644 index 7b5a0c55ba..0000000000 --- a/samples/data/dnn/fcn32s-heavy-pascal.prototxt +++ /dev/null @@ -1,502 +0,0 @@ -# -# This prototxt is based on voc-fcn32s/val.prototxt file from -# https://github.com/shelhamer/fcn.berkeleyvision.org, which is distributed under -# Caffe (BSD) license: -# http://caffe.berkeleyvision.org/model_zoo.html#bvlc-model-license -# -name: "voc-fcn32s" -input: "data" -input_dim: 1 -input_dim: 3 -input_dim: 500 -input_dim: 500 -layer { - name: "conv1_1" - type: "Convolution" - bottom: "data" - top: "conv1_1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 100 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu3_1" - type: "ReLU" - bottom: "conv3_1" - top: "conv3_1" -} -layer { - name: "conv3_2" - type: "Convolution" - bottom: "conv3_1" - top: "conv3_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu3_2" - type: "ReLU" - bottom: "conv3_2" - top: "conv3_2" -} -layer { - name: "conv3_3" - type: "Convolution" - bottom: "conv3_2" - top: "conv3_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu4_1" - type: "ReLU" - bottom: "conv4_1" - top: "conv4_1" -} -layer { - name: "conv4_2" - type: "Convolution" - bottom: "conv4_1" - top: "conv4_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu4_2" - type: "ReLU" - bottom: "conv4_2" - top: "conv4_2" -} -layer { - name: "conv4_3" - type: "Convolution" - bottom: "conv4_2" - top: "conv4_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu5_1" - type: "ReLU" - bottom: "conv5_1" - top: "conv5_1" -} -layer { - name: "conv5_2" - type: "Convolution" - bottom: "conv5_1" - top: "conv5_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu5_2" - type: "ReLU" - bottom: "conv5_2" - top: "conv5_2" -} -layer { - name: "conv5_3" - type: "Convolution" - bottom: "conv5_2" - top: "conv5_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu5_3" - type: "ReLU" - bottom: "conv5_3" - top: "conv5_3" -} -layer { - name: "pool5" - type: "Pooling" - bottom: "conv5_3" - top: "pool5" - pooling_param { - pool: MAX - kernel_size: 2 - stride: 2 - } -} -layer { - name: "fc6" - type: "Convolution" - bottom: "pool5" - top: "fc6" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 4096 - pad: 0 - kernel_size: 7 - stride: 1 - } -} -layer { - name: "relu6" - type: "ReLU" - bottom: "fc6" - top: "fc6" -} -layer { - name: "fc7" - type: "Convolution" - bottom: "fc6" - top: "fc7" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 4096 - pad: 0 - kernel_size: 1 - stride: 1 - } -} -layer { - name: "relu7" - type: "ReLU" - bottom: "fc7" - top: "fc7" -} -layer { - name: "score_fr" - type: "Convolution" - bottom: "fc7" - top: "score_fr" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 21 - pad: 0 - kernel_size: 1 - } -} -layer { - name: "upscore" - type: "Deconvolution" - bottom: "score_fr" - top: "upscore" - param { - lr_mult: 0 - } - convolution_param { - num_output: 21 - bias_term: false - kernel_size: 64 - stride: 32 - } -} -layer { - name: "score" - type: "Crop" - bottom: "upscore" - bottom: "data" - top: "score" - crop_param { - axis: 2 - offset: 19 - } -} diff --git a/samples/data/dnn/fcn8s-heavy-pascal.prototxt b/samples/data/dnn/fcn8s-heavy-pascal.prototxt deleted file mode 100644 index 426b40f815..0000000000 --- a/samples/data/dnn/fcn8s-heavy-pascal.prototxt +++ /dev/null @@ -1,612 +0,0 @@ -# -# This prototxt is based on voc-fcn8s/val.prototxt file from -# https://github.com/shelhamer/fcn.berkeleyvision.org, which is distributed under -# Caffe (BSD) license: -# http://caffe.berkeleyvision.org/model_zoo.html#bvlc-model-license -# -name: "voc-fcn8s" -input: "data" -input_dim: 1 -input_dim: 3 -input_dim: 500 -input_dim: 500 -layer { - name: "conv1_1" - type: "Convolution" - bottom: "data" - top: "conv1_1" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 100 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu3_1" - type: "ReLU" - bottom: "conv3_1" - top: "conv3_1" -} -layer { - name: "conv3_2" - type: "Convolution" - bottom: "conv3_1" - top: "conv3_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu3_2" - type: "ReLU" - bottom: "conv3_2" - top: "conv3_2" -} -layer { - name: "conv3_3" - type: "Convolution" - bottom: "conv3_2" - top: "conv3_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu4_1" - type: "ReLU" - bottom: "conv4_1" - top: "conv4_1" -} -layer { - name: "conv4_2" - type: "Convolution" - bottom: "conv4_1" - top: "conv4_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu4_2" - type: "ReLU" - bottom: "conv4_2" - top: "conv4_2" -} -layer { - name: "conv4_3" - type: "Convolution" - bottom: "conv4_2" - top: "conv4_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -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 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu5_1" - type: "ReLU" - bottom: "conv5_1" - top: "conv5_1" -} -layer { - name: "conv5_2" - type: "Convolution" - bottom: "conv5_1" - top: "conv5_2" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu5_2" - type: "ReLU" - bottom: "conv5_2" - top: "conv5_2" -} -layer { - name: "conv5_3" - type: "Convolution" - bottom: "conv5_2" - top: "conv5_3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 512 - pad: 1 - kernel_size: 3 - stride: 1 - } -} -layer { - name: "relu5_3" - type: "ReLU" - bottom: "conv5_3" - top: "conv5_3" -} -layer { - name: "pool5" - type: "Pooling" - bottom: "conv5_3" - top: "pool5" - pooling_param { - pool: MAX - kernel_size: 2 - stride: 2 - } -} -layer { - name: "fc6" - type: "Convolution" - bottom: "pool5" - top: "fc6" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 4096 - pad: 0 - kernel_size: 7 - stride: 1 - } -} -layer { - name: "relu6" - type: "ReLU" - bottom: "fc6" - top: "fc6" -} -layer { - name: "fc7" - type: "Convolution" - bottom: "fc6" - top: "fc7" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 4096 - pad: 0 - kernel_size: 1 - stride: 1 - } -} -layer { - name: "relu7" - type: "ReLU" - bottom: "fc7" - top: "fc7" -} -layer { - name: "score_fr" - type: "Convolution" - bottom: "fc7" - top: "score_fr" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 21 - pad: 0 - kernel_size: 1 - } -} -layer { - name: "upscore2" - type: "Deconvolution" - bottom: "score_fr" - top: "upscore2" - param { - lr_mult: 0 - } - convolution_param { - num_output: 21 - bias_term: false - kernel_size: 4 - stride: 2 - } -} -layer { - name: "score_pool4" - type: "Convolution" - bottom: "pool4" - top: "score_pool4" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 21 - pad: 0 - kernel_size: 1 - } -} -layer { - name: "score_pool4c" - type: "Crop" - bottom: "score_pool4" - bottom: "upscore2" - top: "score_pool4c" - crop_param { - axis: 2 - offset: 5 - } -} -layer { - name: "fuse_pool4" - type: "Eltwise" - bottom: "upscore2" - bottom: "score_pool4c" - top: "fuse_pool4" - eltwise_param { - operation: SUM - } -} -layer { - name: "upscore_pool4" - type: "Deconvolution" - bottom: "fuse_pool4" - top: "upscore_pool4" - param { - lr_mult: 0 - } - convolution_param { - num_output: 21 - bias_term: false - kernel_size: 4 - stride: 2 - } -} -layer { - name: "score_pool3" - type: "Convolution" - bottom: "pool3" - top: "score_pool3" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 21 - pad: 0 - kernel_size: 1 - } -} -layer { - name: "score_pool3c" - type: "Crop" - bottom: "score_pool3" - bottom: "upscore_pool4" - top: "score_pool3c" - crop_param { - axis: 2 - offset: 9 - } -} -layer { - name: "fuse_pool3" - type: "Eltwise" - bottom: "upscore_pool4" - bottom: "score_pool3c" - top: "fuse_pool3" - eltwise_param { - operation: SUM - } -} -layer { - name: "upscore8" - type: "Deconvolution" - bottom: "fuse_pool3" - top: "upscore8" - param { - lr_mult: 0 - } - convolution_param { - num_output: 21 - bias_term: false - kernel_size: 16 - stride: 8 - } -} -layer { - name: "score" - type: "Crop" - bottom: "upscore8" - bottom: "data" - top: "score" - crop_param { - axis: 2 - offset: 31 - } -} diff --git a/samples/data/dnn/pascal-classes.txt b/samples/data/dnn/pascal-classes.txt deleted file mode 100644 index a3a62c1911..0000000000 --- a/samples/data/dnn/pascal-classes.txt +++ /dev/null @@ -1,21 +0,0 @@ -background 0 0 0 -aeroplane 128 0 0 -bicycle 0 128 0 -bird 128 128 0 -boat 0 0 128 -bottle 128 0 128 -bus 0 128 128 -car 128 128 128 -cat 64 0 0 -chair 192 0 0 -cow 64 128 0 -diningtable 192 128 0 -dog 64 0 128 -horse 192 0 128 -motorbike 64 128 128 -person 192 128 128 -pottedplant 0 64 0 -sheep 128 64 0 -sofa 0 192 0 -train 128 192 0 -tvmonitor 0 64 128 diff --git a/samples/data/dnn/rgb.jpg b/samples/data/dnn/rgb.jpg deleted file mode 100644 index f78e6e44e1..0000000000 Binary files a/samples/data/dnn/rgb.jpg and /dev/null differ diff --git a/samples/data/dnn/space_shuttle.jpg b/samples/data/dnn/space_shuttle.jpg deleted file mode 100644 index 412a919694..0000000000 Binary files a/samples/data/dnn/space_shuttle.jpg and /dev/null differ diff --git a/samples/data/dnn/synset_words.txt b/samples/data/dnn/synset_words.txt deleted file mode 100644 index a9e8c7f50d..0000000000 --- a/samples/data/dnn/synset_words.txt +++ /dev/null @@ -1,1000 +0,0 @@ -n01440764 tench, Tinca tinca -n01443537 goldfish, Carassius auratus -n01484850 great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias -n01491361 tiger shark, Galeocerdo cuvieri -n01494475 hammerhead, hammerhead shark -n01496331 electric ray, crampfish, numbfish, torpedo -n01498041 stingray -n01514668 cock -n01514859 hen -n01518878 ostrich, Struthio camelus -n01530575 brambling, Fringilla montifringilla -n01531178 goldfinch, Carduelis carduelis -n01532829 house finch, linnet, Carpodacus mexicanus -n01534433 junco, snowbird -n01537544 indigo bunting, indigo finch, indigo bird, Passerina cyanea -n01558993 robin, American robin, Turdus migratorius -n01560419 bulbul -n01580077 jay -n01582220 magpie -n01592084 chickadee -n01601694 water ouzel, dipper -n01608432 kite -n01614925 bald eagle, American eagle, Haliaeetus leucocephalus -n01616318 vulture -n01622779 great grey owl, great gray owl, Strix nebulosa -n01629819 European fire salamander, Salamandra salamandra -n01630670 common newt, Triturus vulgaris -n01631663 eft -n01632458 spotted salamander, Ambystoma maculatum -n01632777 axolotl, mud puppy, Ambystoma mexicanum -n01641577 bullfrog, Rana catesbeiana -n01644373 tree frog, tree-frog -n01644900 tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui -n01664065 loggerhead, loggerhead turtle, Caretta caretta -n01665541 leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea -n01667114 mud turtle -n01667778 terrapin -n01669191 box turtle, box tortoise -n01675722 banded gecko -n01677366 common iguana, iguana, Iguana iguana -n01682714 American chameleon, anole, Anolis carolinensis -n01685808 whiptail, whiptail lizard -n01687978 agama -n01688243 frilled lizard, Chlamydosaurus kingi -n01689811 alligator lizard -n01692333 Gila monster, Heloderma suspectum -n01693334 green lizard, Lacerta viridis -n01694178 African chameleon, Chamaeleo chamaeleon -n01695060 Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis -n01697457 African crocodile, Nile crocodile, Crocodylus niloticus -n01698640 American alligator, Alligator mississipiensis -n01704323 triceratops -n01728572 thunder snake, worm snake, Carphophis amoenus -n01728920 ringneck snake, ring-necked snake, ring snake -n01729322 hognose snake, puff adder, sand viper -n01729977 green snake, grass snake -n01734418 king snake, kingsnake -n01735189 garter snake, grass snake -n01737021 water snake -n01739381 vine snake -n01740131 night snake, Hypsiglena torquata -n01742172 boa constrictor, Constrictor constrictor -n01744401 rock python, rock snake, Python sebae -n01748264 Indian cobra, Naja naja -n01749939 green mamba -n01751748 sea snake -n01753488 horned viper, cerastes, sand viper, horned asp, Cerastes cornutus -n01755581 diamondback, diamondback rattlesnake, Crotalus adamanteus -n01756291 sidewinder, horned rattlesnake, Crotalus cerastes -n01768244 trilobite -n01770081 harvestman, daddy longlegs, Phalangium opilio -n01770393 scorpion -n01773157 black and gold garden spider, Argiope aurantia -n01773549 barn spider, Araneus cavaticus -n01773797 garden spider, Aranea diademata -n01774384 black widow, Latrodectus mactans -n01774750 tarantula -n01775062 wolf spider, hunting spider -n01776313 tick -n01784675 centipede -n01795545 black grouse -n01796340 ptarmigan -n01797886 ruffed grouse, partridge, Bonasa umbellus -n01798484 prairie chicken, prairie grouse, prairie fowl -n01806143 peacock -n01806567 quail -n01807496 partridge -n01817953 African grey, African gray, Psittacus erithacus -n01818515 macaw -n01819313 sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita -n01820546 lorikeet -n01824575 coucal -n01828970 bee eater -n01829413 hornbill -n01833805 hummingbird -n01843065 jacamar -n01843383 toucan -n01847000 drake -n01855032 red-breasted merganser, Mergus serrator -n01855672 goose -n01860187 black swan, Cygnus atratus -n01871265 tusker -n01872401 echidna, spiny anteater, anteater -n01873310 platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus -n01877812 wallaby, brush kangaroo -n01882714 koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus -n01883070 wombat -n01910747 jellyfish -n01914609 sea anemone, anemone -n01917289 brain coral -n01924916 flatworm, platyhelminth -n01930112 nematode, nematode worm, roundworm -n01943899 conch -n01944390 snail -n01945685 slug -n01950731 sea slug, nudibranch -n01955084 chiton, coat-of-mail shell, sea cradle, polyplacophore -n01968897 chambered nautilus, pearly nautilus, nautilus -n01978287 Dungeness crab, Cancer magister -n01978455 rock crab, Cancer irroratus -n01980166 fiddler crab -n01981276 king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica -n01983481 American lobster, Northern lobster, Maine lobster, Homarus americanus -n01984695 spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish -n01985128 crayfish, crawfish, crawdad, crawdaddy -n01986214 hermit crab -n01990800 isopod -n02002556 white stork, Ciconia ciconia -n02002724 black stork, Ciconia nigra -n02006656 spoonbill -n02007558 flamingo -n02009229 little blue heron, Egretta caerulea -n02009912 American egret, great white heron, Egretta albus -n02011460 bittern -n02012849 crane -n02013706 limpkin, Aramus pictus -n02017213 European gallinule, Porphyrio porphyrio -n02018207 American coot, marsh hen, mud hen, water hen, Fulica americana -n02018795 bustard -n02025239 ruddy turnstone, Arenaria interpres -n02027492 red-backed sandpiper, dunlin, Erolia alpina -n02028035 redshank, Tringa totanus -n02033041 dowitcher -n02037110 oystercatcher, oyster catcher -n02051845 pelican -n02056570 king penguin, Aptenodytes patagonica -n02058221 albatross, mollymawk -n02066245 grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus -n02071294 killer whale, killer, orca, grampus, sea wolf, Orcinus orca -n02074367 dugong, Dugong dugon -n02077923 sea lion -n02085620 Chihuahua -n02085782 Japanese spaniel -n02085936 Maltese dog, Maltese terrier, Maltese -n02086079 Pekinese, Pekingese, Peke -n02086240 Shih-Tzu -n02086646 Blenheim spaniel -n02086910 papillon -n02087046 toy terrier -n02087394 Rhodesian ridgeback -n02088094 Afghan hound, Afghan -n02088238 basset, basset hound -n02088364 beagle -n02088466 bloodhound, sleuthhound -n02088632 bluetick -n02089078 black-and-tan coonhound -n02089867 Walker hound, Walker foxhound -n02089973 English foxhound -n02090379 redbone -n02090622 borzoi, Russian wolfhound -n02090721 Irish wolfhound -n02091032 Italian greyhound -n02091134 whippet -n02091244 Ibizan hound, Ibizan Podenco -n02091467 Norwegian elkhound, elkhound -n02091635 otterhound, otter hound -n02091831 Saluki, gazelle hound -n02092002 Scottish deerhound, deerhound -n02092339 Weimaraner -n02093256 Staffordshire bullterrier, Staffordshire bull terrier -n02093428 American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier -n02093647 Bedlington terrier -n02093754 Border terrier -n02093859 Kerry blue terrier -n02093991 Irish terrier -n02094114 Norfolk terrier -n02094258 Norwich terrier -n02094433 Yorkshire terrier -n02095314 wire-haired fox terrier -n02095570 Lakeland terrier -n02095889 Sealyham terrier, Sealyham -n02096051 Airedale, Airedale terrier -n02096177 cairn, cairn terrier -n02096294 Australian terrier -n02096437 Dandie Dinmont, Dandie Dinmont terrier -n02096585 Boston bull, Boston terrier -n02097047 miniature schnauzer -n02097130 giant schnauzer -n02097209 standard schnauzer -n02097298 Scotch terrier, Scottish terrier, Scottie -n02097474 Tibetan terrier, chrysanthemum dog -n02097658 silky terrier, Sydney silky -n02098105 soft-coated wheaten terrier -n02098286 West Highland white terrier -n02098413 Lhasa, Lhasa apso -n02099267 flat-coated retriever -n02099429 curly-coated retriever -n02099601 golden retriever -n02099712 Labrador retriever -n02099849 Chesapeake Bay retriever -n02100236 German short-haired pointer -n02100583 vizsla, Hungarian pointer -n02100735 English setter -n02100877 Irish setter, red setter -n02101006 Gordon setter -n02101388 Brittany spaniel -n02101556 clumber, clumber spaniel -n02102040 English springer, English springer spaniel -n02102177 Welsh springer spaniel -n02102318 cocker spaniel, English cocker spaniel, cocker -n02102480 Sussex spaniel -n02102973 Irish water spaniel -n02104029 kuvasz -n02104365 schipperke -n02105056 groenendael -n02105162 malinois -n02105251 briard -n02105412 kelpie -n02105505 komondor -n02105641 Old English sheepdog, bobtail -n02105855 Shetland sheepdog, Shetland sheep dog, Shetland -n02106030 collie -n02106166 Border collie -n02106382 Bouvier des Flandres, Bouviers des Flandres -n02106550 Rottweiler -n02106662 German shepherd, German shepherd dog, German police dog, alsatian -n02107142 Doberman, Doberman pinscher -n02107312 miniature pinscher -n02107574 Greater Swiss Mountain dog -n02107683 Bernese mountain dog -n02107908 Appenzeller -n02108000 EntleBucher -n02108089 boxer -n02108422 bull mastiff -n02108551 Tibetan mastiff -n02108915 French bulldog -n02109047 Great Dane -n02109525 Saint Bernard, St Bernard -n02109961 Eskimo dog, husky -n02110063 malamute, malemute, Alaskan malamute -n02110185 Siberian husky -n02110341 dalmatian, coach dog, carriage dog -n02110627 affenpinscher, monkey pinscher, monkey dog -n02110806 basenji -n02110958 pug, pug-dog -n02111129 Leonberg -n02111277 Newfoundland, Newfoundland dog -n02111500 Great Pyrenees -n02111889 Samoyed, Samoyede -n02112018 Pomeranian -n02112137 chow, chow chow -n02112350 keeshond -n02112706 Brabancon griffon -n02113023 Pembroke, Pembroke Welsh corgi -n02113186 Cardigan, Cardigan Welsh corgi -n02113624 toy poodle -n02113712 miniature poodle -n02113799 standard poodle -n02113978 Mexican hairless -n02114367 timber wolf, grey wolf, gray wolf, Canis lupus -n02114548 white wolf, Arctic wolf, Canis lupus tundrarum -n02114712 red wolf, maned wolf, Canis rufus, Canis niger -n02114855 coyote, prairie wolf, brush wolf, Canis latrans -n02115641 dingo, warrigal, warragal, Canis dingo -n02115913 dhole, Cuon alpinus -n02116738 African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus -n02117135 hyena, hyaena -n02119022 red fox, Vulpes vulpes -n02119789 kit fox, Vulpes macrotis -n02120079 Arctic fox, white fox, Alopex lagopus -n02120505 grey fox, gray fox, Urocyon cinereoargenteus -n02123045 tabby, tabby cat -n02123159 tiger cat -n02123394 Persian cat -n02123597 Siamese cat, Siamese -n02124075 Egyptian cat -n02125311 cougar, puma, catamount, mountain lion, painter, panther, Felis concolor -n02127052 lynx, catamount -n02128385 leopard, Panthera pardus -n02128757 snow leopard, ounce, Panthera uncia -n02128925 jaguar, panther, Panthera onca, Felis onca -n02129165 lion, king of beasts, Panthera leo -n02129604 tiger, Panthera tigris -n02130308 cheetah, chetah, Acinonyx jubatus -n02132136 brown bear, bruin, Ursus arctos -n02133161 American black bear, black bear, Ursus americanus, Euarctos americanus -n02134084 ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus -n02134418 sloth bear, Melursus ursinus, Ursus ursinus -n02137549 mongoose -n02138441 meerkat, mierkat -n02165105 tiger beetle -n02165456 ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle -n02167151 ground beetle, carabid beetle -n02168699 long-horned beetle, longicorn, longicorn beetle -n02169497 leaf beetle, chrysomelid -n02172182 dung beetle -n02174001 rhinoceros beetle -n02177972 weevil -n02190166 fly -n02206856 bee -n02219486 ant, emmet, pismire -n02226429 grasshopper, hopper -n02229544 cricket -n02231487 walking stick, walkingstick, stick insect -n02233338 cockroach, roach -n02236044 mantis, mantid -n02256656 cicada, cicala -n02259212 leafhopper -n02264363 lacewing, lacewing fly -n02268443 dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk -n02268853 damselfly -n02276258 admiral -n02277742 ringlet, ringlet butterfly -n02279972 monarch, monarch butterfly, milkweed butterfly, Danaus plexippus -n02280649 cabbage butterfly -n02281406 sulphur butterfly, sulfur butterfly -n02281787 lycaenid, lycaenid butterfly -n02317335 starfish, sea star -n02319095 sea urchin -n02321529 sea cucumber, holothurian -n02325366 wood rabbit, cottontail, cottontail rabbit -n02326432 hare -n02328150 Angora, Angora rabbit -n02342885 hamster -n02346627 porcupine, hedgehog -n02356798 fox squirrel, eastern fox squirrel, Sciurus niger -n02361337 marmot -n02363005 beaver -n02364673 guinea pig, Cavia cobaya -n02389026 sorrel -n02391049 zebra -n02395406 hog, pig, grunter, squealer, Sus scrofa -n02396427 wild boar, boar, Sus scrofa -n02397096 warthog -n02398521 hippopotamus, hippo, river horse, Hippopotamus amphibius -n02403003 ox -n02408429 water buffalo, water ox, Asiatic buffalo, Bubalus bubalis -n02410509 bison -n02412080 ram, tup -n02415577 bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis -n02417914 ibex, Capra ibex -n02422106 hartebeest -n02422699 impala, Aepyceros melampus -n02423022 gazelle -n02437312 Arabian camel, dromedary, Camelus dromedarius -n02437616 llama -n02441942 weasel -n02442845 mink -n02443114 polecat, fitch, foulmart, foumart, Mustela putorius -n02443484 black-footed ferret, ferret, Mustela nigripes -n02444819 otter -n02445715 skunk, polecat, wood pussy -n02447366 badger -n02454379 armadillo -n02457408 three-toed sloth, ai, Bradypus tridactylus -n02480495 orangutan, orang, orangutang, Pongo pygmaeus -n02480855 gorilla, Gorilla gorilla -n02481823 chimpanzee, chimp, Pan troglodytes -n02483362 gibbon, Hylobates lar -n02483708 siamang, Hylobates syndactylus, Symphalangus syndactylus -n02484975 guenon, guenon monkey -n02486261 patas, hussar monkey, Erythrocebus patas -n02486410 baboon -n02487347 macaque -n02488291 langur -n02488702 colobus, colobus monkey -n02489166 proboscis monkey, Nasalis larvatus -n02490219 marmoset -n02492035 capuchin, ringtail, Cebus capucinus -n02492660 howler monkey, howler -n02493509 titi, titi monkey -n02493793 spider monkey, Ateles geoffroyi -n02494079 squirrel monkey, Saimiri sciureus -n02497673 Madagascar cat, ring-tailed lemur, Lemur catta -n02500267 indri, indris, Indri indri, Indri brevicaudatus -n02504013 Indian elephant, Elephas maximus -n02504458 African elephant, Loxodonta africana -n02509815 lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens -n02510455 giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca -n02514041 barracouta, snoek -n02526121 eel -n02536864 coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch -n02606052 rock beauty, Holocanthus tricolor -n02607072 anemone fish -n02640242 sturgeon -n02641379 gar, garfish, garpike, billfish, Lepisosteus osseus -n02643566 lionfish -n02655020 puffer, pufferfish, blowfish, globefish -n02666196 abacus -n02667093 abaya -n02669723 academic gown, academic robe, judge's robe -n02672831 accordion, piano accordion, squeeze box -n02676566 acoustic guitar -n02687172 aircraft carrier, carrier, flattop, attack aircraft carrier -n02690373 airliner -n02692877 airship, dirigible -n02699494 altar -n02701002 ambulance -n02704792 amphibian, amphibious vehicle -n02708093 analog clock -n02727426 apiary, bee house -n02730930 apron -n02747177 ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin -n02749479 assault rifle, assault gun -n02769748 backpack, back pack, knapsack, packsack, rucksack, haversack -n02776631 bakery, bakeshop, bakehouse -n02777292 balance beam, beam -n02782093 balloon -n02783161 ballpoint, ballpoint pen, ballpen, Biro -n02786058 Band Aid -n02787622 banjo -n02788148 bannister, banister, balustrade, balusters, handrail -n02790996 barbell -n02791124 barber chair -n02791270 barbershop -n02793495 barn -n02794156 barometer -n02795169 barrel, cask -n02797295 barrow, garden cart, lawn cart, wheelbarrow -n02799071 baseball -n02802426 basketball -n02804414 bassinet -n02804610 bassoon -n02807133 bathing cap, swimming cap -n02808304 bath towel -n02808440 bathtub, bathing tub, bath, tub -n02814533 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon -n02814860 beacon, lighthouse, beacon light, pharos -n02815834 beaker -n02817516 bearskin, busby, shako -n02823428 beer bottle -n02823750 beer glass -n02825657 bell cote, bell cot -n02834397 bib -n02835271 bicycle-built-for-two, tandem bicycle, tandem -n02837789 bikini, two-piece -n02840245 binder, ring-binder -n02841315 binoculars, field glasses, opera glasses -n02843684 birdhouse -n02859443 boathouse -n02860847 bobsled, bobsleigh, bob -n02865351 bolo tie, bolo, bola tie, bola -n02869837 bonnet, poke bonnet -n02870880 bookcase -n02871525 bookshop, bookstore, bookstall -n02877765 bottlecap -n02879718 bow -n02883205 bow tie, bow-tie, bowtie -n02892201 brass, memorial tablet, plaque -n02892767 brassiere, bra, bandeau -n02894605 breakwater, groin, groyne, mole, bulwark, seawall, jetty -n02895154 breastplate, aegis, egis -n02906734 broom -n02909870 bucket, pail -n02910353 buckle -n02916936 bulletproof vest -n02917067 bullet train, bullet -n02927161 butcher shop, meat market -n02930766 cab, hack, taxi, taxicab -n02939185 caldron, cauldron -n02948072 candle, taper, wax light -n02950826 cannon -n02951358 canoe -n02951585 can opener, tin opener -n02963159 cardigan -n02965783 car mirror -n02966193 carousel, carrousel, merry-go-round, roundabout, whirligig -n02966687 carpenter's kit, tool kit -n02971356 carton -n02974003 car wheel -n02977058 cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM -n02978881 cassette -n02979186 cassette player -n02980441 castle -n02981792 catamaran -n02988304 CD player -n02992211 cello, violoncello -n02992529 cellular telephone, cellular phone, cellphone, cell, mobile phone -n02999410 chain -n03000134 chainlink fence -n03000247 chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour -n03000684 chain saw, chainsaw -n03014705 chest -n03016953 chiffonier, commode -n03017168 chime, bell, gong -n03018349 china cabinet, china closet -n03026506 Christmas stocking -n03028079 church, church building -n03032252 cinema, movie theater, movie theatre, movie house, picture palace -n03041632 cleaver, meat cleaver, chopper -n03042490 cliff dwelling -n03045698 cloak -n03047690 clog, geta, patten, sabot -n03062245 cocktail shaker -n03063599 coffee mug -n03063689 coffeepot -n03065424 coil, spiral, volute, whorl, helix -n03075370 combination lock -n03085013 computer keyboard, keypad -n03089624 confectionery, confectionary, candy store -n03095699 container ship, containership, container vessel -n03100240 convertible -n03109150 corkscrew, bottle screw -n03110669 cornet, horn, trumpet, trump -n03124043 cowboy boot -n03124170 cowboy hat, ten-gallon hat -n03125729 cradle -n03126707 crane -n03127747 crash helmet -n03127925 crate -n03131574 crib, cot -n03133878 Crock Pot -n03134739 croquet ball -n03141823 crutch -n03146219 cuirass -n03160309 dam, dike, dyke -n03179701 desk -n03180011 desktop computer -n03187595 dial telephone, dial phone -n03188531 diaper, nappy, napkin -n03196217 digital clock -n03197337 digital watch -n03201208 dining table, board -n03207743 dishrag, dishcloth -n03207941 dishwasher, dish washer, dishwashing machine -n03208938 disk brake, disc brake -n03216828 dock, dockage, docking facility -n03218198 dogsled, dog sled, dog sleigh -n03220513 dome -n03223299 doormat, welcome mat -n03240683 drilling platform, offshore rig -n03249569 drum, membranophone, tympan -n03250847 drumstick -n03255030 dumbbell -n03259280 Dutch oven -n03271574 electric fan, blower -n03272010 electric guitar -n03272562 electric locomotive -n03290653 entertainment center -n03291819 envelope -n03297495 espresso maker -n03314780 face powder -n03325584 feather boa, boa -n03337140 file, file cabinet, filing cabinet -n03344393 fireboat -n03345487 fire engine, fire truck -n03347037 fire screen, fireguard -n03355925 flagpole, flagstaff -n03372029 flute, transverse flute -n03376595 folding chair -n03379051 football helmet -n03384352 forklift -n03388043 fountain -n03388183 fountain pen -n03388549 four-poster -n03393912 freight car -n03394916 French horn, horn -n03400231 frying pan, frypan, skillet -n03404251 fur coat -n03417042 garbage truck, dustcart -n03424325 gasmask, respirator, gas helmet -n03425413 gas pump, gasoline pump, petrol pump, island dispenser -n03443371 goblet -n03444034 go-kart -n03445777 golf ball -n03445924 golfcart, golf cart -n03447447 gondola -n03447721 gong, tam-tam -n03450230 gown -n03452741 grand piano, grand -n03457902 greenhouse, nursery, glasshouse -n03459775 grille, radiator grille -n03461385 grocery store, grocery, food market, market -n03467068 guillotine -n03476684 hair slide -n03476991 hair spray -n03478589 half track -n03481172 hammer -n03482405 hamper -n03483316 hand blower, blow dryer, blow drier, hair dryer, hair drier -n03485407 hand-held computer, hand-held microcomputer -n03485794 handkerchief, hankie, hanky, hankey -n03492542 hard disc, hard disk, fixed disk -n03494278 harmonica, mouth organ, harp, mouth harp -n03495258 harp -n03496892 harvester, reaper -n03498962 hatchet -n03527444 holster -n03529860 home theater, home theatre -n03530642 honeycomb -n03532672 hook, claw -n03534580 hoopskirt, crinoline -n03535780 horizontal bar, high bar -n03538406 horse cart, horse-cart -n03544143 hourglass -n03584254 iPod -n03584829 iron, smoothing iron -n03590841 jack-o'-lantern -n03594734 jean, blue jean, denim -n03594945 jeep, landrover -n03595614 jersey, T-shirt, tee shirt -n03598930 jigsaw puzzle -n03599486 jinrikisha, ricksha, rickshaw -n03602883 joystick -n03617480 kimono -n03623198 knee pad -n03627232 knot -n03630383 lab coat, laboratory coat -n03633091 ladle -n03637318 lampshade, lamp shade -n03642806 laptop, laptop computer -n03649909 lawn mower, mower -n03657121 lens cap, lens cover -n03658185 letter opener, paper knife, paperknife -n03661043 library -n03662601 lifeboat -n03666591 lighter, light, igniter, ignitor -n03670208 limousine, limo -n03673027 liner, ocean liner -n03676483 lipstick, lip rouge -n03680355 Loafer -n03690938 lotion -n03691459 loudspeaker, speaker, speaker unit, loudspeaker system, speaker system -n03692522 loupe, jeweler's loupe -n03697007 lumbermill, sawmill -n03706229 magnetic compass -n03709823 mailbag, postbag -n03710193 mailbox, letter box -n03710637 maillot -n03710721 maillot, tank suit -n03717622 manhole cover -n03720891 maraca -n03721384 marimba, xylophone -n03724870 mask -n03729826 matchstick -n03733131 maypole -n03733281 maze, labyrinth -n03733805 measuring cup -n03742115 medicine chest, medicine cabinet -n03743016 megalith, megalithic structure -n03759954 microphone, mike -n03761084 microwave, microwave oven -n03763968 military uniform -n03764736 milk can -n03769881 minibus -n03770439 miniskirt, mini -n03770679 minivan -n03773504 missile -n03775071 mitten -n03775546 mixing bowl -n03776460 mobile home, manufactured home -n03777568 Model T -n03777754 modem -n03781244 monastery -n03782006 monitor -n03785016 moped -n03786901 mortar -n03787032 mortarboard -n03788195 mosque -n03788365 mosquito net -n03791053 motor scooter, scooter -n03792782 mountain bike, all-terrain bike, off-roader -n03792972 mountain tent -n03793489 mouse, computer mouse -n03794056 mousetrap -n03796401 moving van -n03803284 muzzle -n03804744 nail -n03814639 neck brace -n03814906 necklace -n03825788 nipple -n03832673 notebook, notebook computer -n03837869 obelisk -n03838899 oboe, hautboy, hautbois -n03840681 ocarina, sweet potato -n03841143 odometer, hodometer, mileometer, milometer -n03843555 oil filter -n03854065 organ, pipe organ -n03857828 oscilloscope, scope, cathode-ray oscilloscope, CRO -n03866082 overskirt -n03868242 oxcart -n03868863 oxygen mask -n03871628 packet -n03873416 paddle, boat paddle -n03874293 paddlewheel, paddle wheel -n03874599 padlock -n03876231 paintbrush -n03877472 pajama, pyjama, pj's, jammies -n03877845 palace -n03884397 panpipe, pandean pipe, syrinx -n03887697 paper towel -n03888257 parachute, chute -n03888605 parallel bars, bars -n03891251 park bench -n03891332 parking meter -n03895866 passenger car, coach, carriage -n03899768 patio, terrace -n03902125 pay-phone, pay-station -n03903868 pedestal, plinth, footstall -n03908618 pencil box, pencil case -n03908714 pencil sharpener -n03916031 perfume, essence -n03920288 Petri dish -n03924679 photocopier -n03929660 pick, plectrum, plectron -n03929855 pickelhaube -n03930313 picket fence, paling -n03930630 pickup, pickup truck -n03933933 pier -n03935335 piggy bank, penny bank -n03937543 pill bottle -n03938244 pillow -n03942813 ping-pong ball -n03944341 pinwheel -n03947888 pirate, pirate ship -n03950228 pitcher, ewer -n03954731 plane, carpenter's plane, woodworking plane -n03956157 planetarium -n03958227 plastic bag -n03961711 plate rack -n03967562 plow, plough -n03970156 plunger, plumber's helper -n03976467 Polaroid camera, Polaroid Land camera -n03976657 pole -n03977966 police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria -n03980874 poncho -n03982430 pool table, billiard table, snooker table -n03983396 pop bottle, soda bottle -n03991062 pot, flowerpot -n03992509 potter's wheel -n03995372 power drill -n03998194 prayer rug, prayer mat -n04004767 printer -n04005630 prison, prison house -n04008634 projectile, missile -n04009552 projector -n04019541 puck, hockey puck -n04023962 punching bag, punch bag, punching ball, punchball -n04026417 purse -n04033901 quill, quill pen -n04033995 quilt, comforter, comfort, puff -n04037443 racer, race car, racing car -n04039381 racket, racquet -n04040759 radiator -n04041544 radio, wireless -n04044716 radio telescope, radio reflector -n04049303 rain barrel -n04065272 recreational vehicle, RV, R.V. -n04067472 reel -n04069434 reflex camera -n04070727 refrigerator, icebox -n04074963 remote control, remote -n04081281 restaurant, eating house, eating place, eatery -n04086273 revolver, six-gun, six-shooter -n04090263 rifle -n04099969 rocking chair, rocker -n04111531 rotisserie -n04116512 rubber eraser, rubber, pencil eraser -n04118538 rugby ball -n04118776 rule, ruler -n04120489 running shoe -n04125021 safe -n04127249 safety pin -n04131690 saltshaker, salt shaker -n04133789 sandal -n04136333 sarong -n04141076 sax, saxophone -n04141327 scabbard -n04141975 scale, weighing machine -n04146614 school bus -n04147183 schooner -n04149813 scoreboard -n04152593 screen, CRT screen -n04153751 screw -n04154565 screwdriver -n04162706 seat belt, seatbelt -n04179913 sewing machine -n04192698 shield, buckler -n04200800 shoe shop, shoe-shop, shoe store -n04201297 shoji -n04204238 shopping basket -n04204347 shopping cart -n04208210 shovel -n04209133 shower cap -n04209239 shower curtain -n04228054 ski -n04229816 ski mask -n04235860 sleeping bag -n04238763 slide rule, slipstick -n04239074 sliding door -n04243546 slot, one-armed bandit -n04251144 snorkel -n04252077 snowmobile -n04252225 snowplow, snowplough -n04254120 soap dispenser -n04254680 soccer ball -n04254777 sock -n04258138 solar dish, solar collector, solar furnace -n04259630 sombrero -n04263257 soup bowl -n04264628 space bar -n04265275 space heater -n04266014 space shuttle -n04270147 spatula -n04273569 speedboat -n04275548 spider web, spider's web -n04277352 spindle -n04285008 sports car, sport car -n04286575 spotlight, spot -n04296562 stage -n04310018 steam locomotive -n04311004 steel arch bridge -n04311174 steel drum -n04317175 stethoscope -n04325704 stole -n04326547 stone wall -n04328186 stopwatch, stop watch -n04330267 stove -n04332243 strainer -n04335435 streetcar, tram, tramcar, trolley, trolley car -n04336792 stretcher -n04344873 studio couch, day bed -n04346328 stupa, tope -n04347754 submarine, pigboat, sub, U-boat -n04350905 suit, suit of clothes -n04355338 sundial -n04355933 sunglass -n04356056 sunglasses, dark glasses, shades -n04357314 sunscreen, sunblock, sun blocker -n04366367 suspension bridge -n04367480 swab, swob, mop -n04370456 sweatshirt -n04371430 swimming trunks, bathing trunks -n04371774 swing -n04372370 switch, electric switch, electrical switch -n04376876 syringe -n04380533 table lamp -n04389033 tank, army tank, armored combat vehicle, armoured combat vehicle -n04392985 tape player -n04398044 teapot -n04399382 teddy, teddy bear -n04404412 television, television system -n04409515 tennis ball -n04417672 thatch, thatched roof -n04418357 theater curtain, theatre curtain -n04423845 thimble -n04428191 thresher, thrasher, threshing machine -n04429376 throne -n04435653 tile roof -n04442312 toaster -n04443257 tobacco shop, tobacconist shop, tobacconist -n04447861 toilet seat -n04456115 torch -n04458633 totem pole -n04461696 tow truck, tow car, wrecker -n04462240 toyshop -n04465501 tractor -n04467665 trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi -n04476259 tray -n04479046 trench coat -n04482393 tricycle, trike, velocipede -n04483307 trimaran -n04485082 tripod -n04486054 triumphal arch -n04487081 trolleybus, trolley coach, trackless trolley -n04487394 trombone -n04493381 tub, vat -n04501370 turnstile -n04505470 typewriter keyboard -n04507155 umbrella -n04509417 unicycle, monocycle -n04515003 upright, upright piano -n04517823 vacuum, vacuum cleaner -n04522168 vase -n04523525 vault -n04525038 velvet -n04525305 vending machine -n04532106 vestment -n04532670 viaduct -n04536866 violin, fiddle -n04540053 volleyball -n04542943 waffle iron -n04548280 wall clock -n04548362 wallet, billfold, notecase, pocketbook -n04550184 wardrobe, closet, press -n04552348 warplane, military plane -n04553703 washbasin, handbasin, washbowl, lavabo, wash-hand basin -n04554684 washer, automatic washer, washing machine -n04557648 water bottle -n04560804 water jug -n04562935 water tower -n04579145 whiskey jug -n04579432 whistle -n04584207 wig -n04589890 window screen -n04590129 window shade -n04591157 Windsor tie -n04591713 wine bottle -n04592741 wing -n04596742 wok -n04597913 wooden spoon -n04599235 wool, woolen, woollen -n04604644 worm fence, snake fence, snake-rail fence, Virginia fence -n04606251 wreck -n04612504 yawl -n04613696 yurt -n06359193 web site, website, internet site, site -n06596364 comic book -n06785654 crossword puzzle, crossword -n06794110 street sign -n06874185 traffic light, traffic signal, stoplight -n07248320 book jacket, dust cover, dust jacket, dust wrapper -n07565083 menu -n07579787 plate -n07583066 guacamole -n07584110 consomme -n07590611 hot pot, hotpot -n07613480 trifle -n07614500 ice cream, icecream -n07615774 ice lolly, lolly, lollipop, popsicle -n07684084 French loaf -n07693725 bagel, beigel -n07695742 pretzel -n07697313 cheeseburger -n07697537 hotdog, hot dog, red hot -n07711569 mashed potato -n07714571 head cabbage -n07714990 broccoli -n07715103 cauliflower -n07716358 zucchini, courgette -n07716906 spaghetti squash -n07717410 acorn squash -n07717556 butternut squash -n07718472 cucumber, cuke -n07718747 artichoke, globe artichoke -n07720875 bell pepper -n07730033 cardoon -n07734744 mushroom -n07742313 Granny Smith -n07745940 strawberry -n07747607 orange -n07749582 lemon -n07753113 fig -n07753275 pineapple, ananas -n07753592 banana -n07754684 jackfruit, jak, jack -n07760859 custard apple -n07768694 pomegranate -n07802026 hay -n07831146 carbonara -n07836838 chocolate sauce, chocolate syrup -n07860988 dough -n07871810 meat loaf, meatloaf -n07873807 pizza, pizza pie -n07875152 potpie -n07880968 burrito -n07892512 red wine -n07920052 espresso -n07930864 cup -n07932039 eggnog -n09193705 alp -n09229709 bubble -n09246464 cliff, drop, drop-off -n09256479 coral reef -n09288635 geyser -n09332890 lakeside, lakeshore -n09399592 promontory, headland, head, foreland -n09421951 sandbar, sand bar -n09428293 seashore, coast, seacoast, sea-coast -n09468604 valley, vale -n09472597 volcano -n09835506 ballplayer, baseball player -n10148035 groom, bridegroom -n10565667 scuba diver -n11879895 rapeseed -n11939491 daisy -n12057211 yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum -n12144580 corn -n12267677 acorn -n12620546 hip, rose hip, rosehip -n12768682 buckeye, horse chestnut, conker -n12985857 coral fungus -n12998815 agaric -n13037406 gyromitra -n13040303 stinkhorn, carrion fungus -n13044778 earthstar -n13052670 hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa -n13054560 bolete -n13133613 ear, spike, capitulum -n15075141 toilet tissue, toilet paper, bathroom tissue diff --git a/samples/dnn/README.md b/samples/dnn/README.md index 3a7523b4b1..07c04ecfa4 100644 --- a/samples/dnn/README.md +++ b/samples/dnn/README.md @@ -14,6 +14,14 @@ | [Faster-RCNN](https://github.com/rbgirshick/py-faster-rcnn) | `1.0` | `800x600` | `102.9801, 115.9465, 122.7717` | BGR | | [R-FCN](https://github.com/YuwenXiong/py-R-FCN) | `1.0` | `800x600` | `102.9801 115.9465 122.7717` | BGR | + +### Classification +| Model | Scale | Size WxH| Mean subtraction | Channels order | +|---------------|-------|-----------|--------------------|-------| +| GoogLeNet | `1.0` | `224x224` | `104 117 123` | BGR | +| [SqueezeNet](https://github.com/DeepScale/SqueezeNet) | `1.0` | `227x227` | `0 0 0` | BGR | + + ## References * [Models downloading script](https://github.com/opencv/opencv_extra/blob/master/testdata/dnn/download_models.py) * [Configuration files adopted for OpenCV](https://github.com/opencv/opencv_extra/tree/master/testdata/dnn) diff --git a/samples/dnn/caffe_googlenet.cpp b/samples/dnn/caffe_googlenet.cpp deleted file mode 100644 index 08195ef2f6..0000000000 --- a/samples/dnn/caffe_googlenet.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/**M/////////////////////////////////////////////////////////////////////////////////////// -// -// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. -// -// By downloading, copying, installing or using the software you agree to this license. -// If you do not agree to this license, do not download, install, -// copy or use the software. -// -// -// License Agreement -// For Open Source Computer Vision Library -// -// Copyright (C) 2013, OpenCV Foundation, all rights reserved. -// Third party copyrights are property of their respective owners. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// * Redistribution's of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Redistribution's in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * The name of the copyright holders may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// This software is provided by the copyright holders and contributors "as is" and -// any express or implied warranties, including, but not limited to, the implied -// warranties of merchantability and fitness for a particular purpose are disclaimed. -// In no event shall the Intel Corporation or contributors be liable for any direct, -// indirect, incidental, special, exemplary, or consequential damages -// (including, but not limited to, procurement of substitute goods or services; -// loss of use, data, or profits; or business interruption) however caused -// and on any theory of liability, whether in contract, strict liability, -// or tort (including negligence or otherwise) arising in any way out of -// the use of this software, even if advised of the possibility of such damage. -// -//M*/ -#include -#include -#include -#include -using namespace cv; -using namespace cv::dnn; - -#include -#include -#include -using namespace std; - -/* Find best class for the blob (i. e. class with maximal probability) */ -static void getMaxClass(const Mat &probBlob, int *classId, double *classProb) -{ - Mat probMat = probBlob.reshape(1, 1); //reshape the blob to 1x1000 matrix - Point classNumber; - - minMaxLoc(probMat, NULL, classProb, NULL, &classNumber); - *classId = classNumber.x; -} - -static std::vector readClassNames(const char *filename ) -{ - std::vector classNames; - - std::ifstream fp(filename); - if (!fp.is_open()) - { - std::cerr << "File with classes labels not found: " << filename << std::endl; - exit(-1); - } - - std::string name; - while (!fp.eof()) - { - std::getline(fp, name); - if (name.length()) - classNames.push_back( name.substr(name.find(' ')+1) ); - } - - fp.close(); - return classNames; -} - -const char* params - = "{ help | false | Sample app for loading googlenet model }" - "{ proto | bvlc_googlenet.prototxt | model configuration }" - "{ model | bvlc_googlenet.caffemodel | model weights }" - "{ label | synset_words.txt | names of ILSVRC2012 classes }" - "{ image | space_shuttle.jpg | path to image file }" - "{ opencl | false | enable OpenCL }" -; - -int main(int argc, char **argv) -{ - CV_TRACE_FUNCTION(); - - CommandLineParser parser(argc, argv, params); - - if (parser.get("help")) - { - parser.printMessage(); - return 0; - } - - String modelTxt = parser.get("proto"); - String modelBin = parser.get("model"); - String imageFile = parser.get("image"); - String classNameFile = parser.get("label"); - - Net net; - try { - //! [Read and initialize network] - net = dnn::readNetFromCaffe(modelTxt, modelBin); - //! [Read and initialize network] - } - catch (const cv::Exception& e) { - std::cerr << "Exception: " << e.what() << std::endl; - //! [Check that network was read successfully] - if (net.empty()) - { - std::cerr << "Can't load network by using the following files: " << std::endl; - std::cerr << "prototxt: " << modelTxt << std::endl; - std::cerr << "caffemodel: " << modelBin << std::endl; - std::cerr << "bvlc_googlenet.caffemodel can be downloaded here:" << std::endl; - std::cerr << "http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel" << std::endl; - exit(-1); - } - //! [Check that network was read successfully] - } - - if (parser.get("opencl")) - { - net.setPreferableTarget(DNN_TARGET_OPENCL); - } - - //! [Prepare blob] - Mat img = imread(imageFile); - if (img.empty()) - { - std::cerr << "Can't read image from the file: " << imageFile << std::endl; - exit(-1); - } - - //GoogLeNet accepts only 224x224 BGR-images - Mat inputBlob = blobFromImage(img, 1.0f, Size(224, 224), - Scalar(104, 117, 123), false); //Convert Mat to batch of images - //! [Prepare blob] - net.setInput(inputBlob, "data"); //set the network input - Mat prob = net.forward("prob"); //compute output - - cv::TickMeter t; - for (int i = 0; i < 10; i++) - { - CV_TRACE_REGION("forward"); - //! [Set input blob] - net.setInput(inputBlob, "data"); //set the network input - //! [Set input blob] - t.start(); - //! [Make forward pass] - prob = net.forward("prob"); //compute output - //! [Make forward pass] - t.stop(); - } - - //! [Gather output] - int classId; - double classProb; - getMaxClass(prob, &classId, &classProb);//find the best class - //! [Gather output] - - //! [Print results] - std::vector classNames = readClassNames(classNameFile.c_str()); - std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl; - std::cout << "Probability: " << classProb * 100 << "%" << std::endl; - //! [Print results] - std::cout << "Time: " << (double)t.getTimeMilli() / t.getCounter() << " ms (average from " << t.getCounter() << " iterations)" << std::endl; - - return 0; -} //main diff --git a/samples/dnn/classification.cpp b/samples/dnn/classification.cpp new file mode 100644 index 0000000000..74b72a43a3 --- /dev/null +++ b/samples/dnn/classification.cpp @@ -0,0 +1,153 @@ +#include +#include +#include + +#include +#include + +const char* keys = + "{ help h | | Print help message. }" + "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}" + "{ model m | | Path to a binary file of model contains trained weights. " + "It could be a file with extensions .caffemodel (Caffe), " + ".pb (TensorFlow), .t7 or .net (Torch), .weights (Darknet) }" + "{ config c | | Path to a text file of model contains network configuration. " + "It could be a file with extensions .prototxt (Caffe), .pbtxt (TensorFlow), .cfg (Darknet) }" + "{ framework f | | Optional name of an origin framework of the model. Detect it automatically if it does not set. }" + "{ classes | | Optional path to a text file with names of classes. }" + "{ mean | | Preprocess input image by subtracting mean values. Mean values should be in BGR order and delimited by spaces. }" + "{ scale | 1 | Preprocess input image by multiplying on a scale factor. }" + "{ width | -1 | Preprocess input image by resizing to a specific width. }" + "{ height | -1 | Preprocess input image by resizing to a specific height. }" + "{ rgb | | Indicate that model works with RGB input images instead BGR ones. }" + "{ backend | 0 | Choose one of computation backends: " + "0: default C++ backend, " + "1: Halide language (http://halide-lang.org/), " + "2: Intel's Deep Learning Inference Engine (https://software.seek.intel.com/deep-learning-deployment)}" + "{ target | 0 | Choose one of target computation devices: " + "0: CPU target (by default)," + "1: OpenCL }"; + +using namespace cv; +using namespace dnn; + +std::vector classes; + +Net readNet(const std::string& model, const std::string& config = "", const std::string& framework = ""); + +int main(int argc, char** argv) +{ + CommandLineParser parser(argc, argv, keys); + parser.about("Use this script to run classification deep learning networks using OpenCV."); + if (argc == 1 || parser.has("help")) + { + parser.printMessage(); + return 0; + } + + float scale = parser.get("scale"); + bool swapRB = parser.get("rgb"); + int inpWidth = parser.get("width"); + int inpHeight = parser.get("height"); + + // Parse mean values. + Scalar mean; + if (parser.has("mean")) + { + std::istringstream meanStr(parser.get("mean")); + std::vector meanValues; + float val; + while (meanStr >> val) + meanValues.push_back(val); + CV_Assert(meanValues.size() == 3); + mean = Scalar(meanValues[0], meanValues[1], meanValues[2]); + } + + // Open file with classes names. + if (parser.has("classes")) + { + std::string file = parser.get("classes"); + std::ifstream ifs(file.c_str()); + if (!ifs.is_open()) + CV_Error(Error::StsError, "File " + file + " not found"); + std::string line; + while (std::getline(ifs, line)) + { + classes.push_back(line); + } + } + + // Load a model. + CV_Assert(parser.has("model")); + Net net = readNet(parser.get("model"), parser.get("config"), parser.get("framework")); + net.setPreferableBackend(parser.get("backend")); + net.setPreferableTarget(parser.get("target")); + + // Create a window + static const std::string kWinName = "Deep learning image classification in OpenCV"; + namedWindow(kWinName, WINDOW_NORMAL); + + // Open a video file or an image file or a camera stream. + VideoCapture cap; + if (parser.has("input")) + cap.open(parser.get("input")); + else + cap.open(0); + + // Process frames. + Mat frame, blob; + while (waitKey(1) < 0) + { + cap >> frame; + if (frame.empty()) + { + waitKey(); + break; + } + + // Create a 4D blob from a frame. + blobFromImage(frame, blob, scale, Size(inpWidth, inpHeight), mean, swapRB, false); + + // Run a model. + net.setInput(blob); + Mat out = net.forward(); + out = out.reshape(1, 1); + + // Get a class with a highest score. + Point classIdPoint; + double confidence; + minMaxLoc(out, 0, &confidence, 0, &classIdPoint); + int classId = classIdPoint.x; + + // Put efficiency information. + std::vector layersTimes; + double t = net.getPerfProfile(layersTimes); + std::string label = format("Inference time: %.2f", t * 1000 / getTickFrequency()); + putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); + + // Print predicted class. + label = format("%s: %.4f", (classes.empty() ? format("Class #%d", classId).c_str() : + classes[classId].c_str()), + confidence); + putText(frame, label, Point(0, 40), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); + + imshow(kWinName, frame); + } + return 0; +} + +Net readNet(const std::string& model, const std::string& config, const std::string& framework) +{ + std::string modelExt = model.substr(model.rfind('.')); + if (framework == "caffe" || modelExt == ".caffemodel") + return readNetFromCaffe(config, model); + else if (framework == "tensorflow" || modelExt == ".pb") + return readNetFromTensorflow(model, config); + else if (framework == "torch" || modelExt == ".t7" || modelExt == ".net") + return readNetFromTorch(model); + else if (framework == "darknet" || modelExt == ".weights") + return readNetFromDarknet(config, model); + else + CV_Error(Error::StsError, "Cannot determine an origin framework of model from file " + model); + return Net(); +} diff --git a/samples/dnn/classification.py b/samples/dnn/classification.py new file mode 100644 index 0000000000..446c9b0577 --- /dev/null +++ b/samples/dnn/classification.py @@ -0,0 +1,98 @@ +import cv2 as cv +import argparse +import numpy as np +import sys + +backends = (cv.dnn.DNN_BACKEND_DEFAULT, cv.dnn.DNN_BACKEND_HALIDE, cv.dnn.DNN_BACKEND_INFERENCE_ENGINE) +targets = (cv.dnn.DNN_TARGET_CPU, cv.dnn.DNN_TARGET_OPENCL) + +parser = argparse.ArgumentParser(description='Use this script to run classification deep learning networks using OpenCV.') +parser.add_argument('--input', help='Path to input image or video file. Skip this argument to capture frames from a camera.') +parser.add_argument('--model', required=True, + help='Path to a binary file of model contains trained weights. ' + 'It could be a file with extensions .caffemodel (Caffe), ' + '.pb (TensorFlow), .t7 or .net (Torch), .weights (Darknet)') +parser.add_argument('--config', + help='Path to a text file of model contains network configuration. ' + 'It could be a file with extensions .prototxt (Caffe), .pbtxt (TensorFlow), .cfg (Darknet)') +parser.add_argument('--framework', choices=['caffe', 'tensorflow', 'torch', 'darknet'], + help='Optional name of an origin framework of the model. ' + 'Detect it automatically if it does not set.') +parser.add_argument('--classes', help='Optional path to a text file with names of classes.') +parser.add_argument('--mean', nargs='+', type=float, default=[0, 0, 0], + help='Preprocess input image by subtracting mean values. ' + 'Mean values should be in BGR order.') +parser.add_argument('--scale', type=float, default=1.0, + help='Preprocess input image by multiplying on a scale factor.') +parser.add_argument('--width', type=int, required=True, + help='Preprocess input image by resizing to a specific width.') +parser.add_argument('--height', type=int, required=True, + help='Preprocess input image by resizing to a specific height.') +parser.add_argument('--rgb', action='store_true', + help='Indicate that model works with RGB input images instead BGR ones.') +parser.add_argument('--backend', choices=backends, default=cv.dnn.DNN_BACKEND_DEFAULT, type=int, + help="Choose one of computation backends: " + "%d: default C++ backend, " + "%d: Halide language (http://halide-lang.org/), " + "%d: Intel's Deep Learning Inference Engine (https://software.seek.intel.com/deep-learning-deployment)" % backends) +parser.add_argument('--target', choices=targets, default=cv.dnn.DNN_TARGET_CPU, type=int, + help='Choose one of target computation devices: ' + '%d: CPU target (by default), ' + '%d: OpenCL' % targets) +args = parser.parse_args() + +# Load names of classes +classes = None +if args.classes: + with open(args.classes, 'rt') as f: + classes = f.read().rstrip('\n').split('\n') + +# Load a network +modelExt = args.model[args.model.rfind('.'):] +if args.framework == 'caffe' or modelExt == '.caffemodel': + net = cv.dnn.readNetFromCaffe(args.config, args.model) +elif args.framework == 'tensorflow' or modelExt == '.pb': + net = cv.dnn.readNetFromTensorflow(args.model, args.config) +elif args.framework == 'torch' or modelExt in ['.t7', '.net']: + net = cv.dnn.readNetFromTorch(args.model) +elif args.framework == 'darknet' or modelExt == '.weights': + net = cv.dnn.readNetFromDarknet(args.config, args.model) +else: + print('Cannot determine an origin framework of model from file %s' % args.model) + sys.exit(0) + +net.setPreferableBackend(args.backend) +net.setPreferableTarget(args.target) + +winName = 'Deep learning image classification in OpenCV' +cv.namedWindow(winName, cv.WINDOW_NORMAL) + +cap = cv.VideoCapture(args.input if args.input else 0) +while cv.waitKey(1) < 0: + hasFrame, frame = cap.read() + if not hasFrame: + cv.waitKey() + break + + # Create a 4D blob from a frame. + blob = cv.dnn.blobFromImage(frame, args.scale, (args.width, args.height), args.mean, args.rgb, crop=False) + + # Run a model + net.setInput(blob) + out = net.forward() + + # Get a class with a highest score. + out = out.flatten() + classId = np.argmax(out) + confidence = out[classId] + + # Put efficiency information. + t, _ = net.getPerfProfile() + label = 'Inference time: %.2f ms' % (t * 1000.0 / cv.getTickFrequency()) + cv.putText(frame, label, (0, 15), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0)) + + # Print predicted class. + label = '%s: %.4f' % (classes[classId] if classes else 'Class #%d' % classId, confidence) + cv.putText(frame, label, (0, 40), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0)) + + cv.imshow(winName, frame) diff --git a/samples/dnn/classification_classes_ILSVRC2012.txt b/samples/dnn/classification_classes_ILSVRC2012.txt new file mode 100644 index 0000000000..a509c00748 --- /dev/null +++ b/samples/dnn/classification_classes_ILSVRC2012.txt @@ -0,0 +1,1000 @@ +tench, Tinca tinca +goldfish, Carassius auratus +great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias +tiger shark, Galeocerdo cuvieri +hammerhead, hammerhead shark +electric ray, crampfish, numbfish, torpedo +stingray +cock +hen +ostrich, Struthio camelus +brambling, Fringilla montifringilla +goldfinch, Carduelis carduelis +house finch, linnet, Carpodacus mexicanus +junco, snowbird +indigo bunting, indigo finch, indigo bird, Passerina cyanea +robin, American robin, Turdus migratorius +bulbul +jay +magpie +chickadee +water ouzel, dipper +kite +bald eagle, American eagle, Haliaeetus leucocephalus +vulture +great grey owl, great gray owl, Strix nebulosa +European fire salamander, Salamandra salamandra +common newt, Triturus vulgaris +eft +spotted salamander, Ambystoma maculatum +axolotl, mud puppy, Ambystoma mexicanum +bullfrog, Rana catesbeiana +tree frog, tree-frog +tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui +loggerhead, loggerhead turtle, Caretta caretta +leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea +mud turtle +terrapin +box turtle, box tortoise +banded gecko +common iguana, iguana, Iguana iguana +American chameleon, anole, Anolis carolinensis +whiptail, whiptail lizard +agama +frilled lizard, Chlamydosaurus kingi +alligator lizard +Gila monster, Heloderma suspectum +green lizard, Lacerta viridis +African chameleon, Chamaeleo chamaeleon +Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis +African crocodile, Nile crocodile, Crocodylus niloticus +American alligator, Alligator mississipiensis +triceratops +thunder snake, worm snake, Carphophis amoenus +ringneck snake, ring-necked snake, ring snake +hognose snake, puff adder, sand viper +green snake, grass snake +king snake, kingsnake +garter snake, grass snake +water snake +vine snake +night snake, Hypsiglena torquata +boa constrictor, Constrictor constrictor +rock python, rock snake, Python sebae +Indian cobra, Naja naja +green mamba +sea snake +horned viper, cerastes, sand viper, horned asp, Cerastes cornutus +diamondback, diamondback rattlesnake, Crotalus adamanteus +sidewinder, horned rattlesnake, Crotalus cerastes +trilobite +harvestman, daddy longlegs, Phalangium opilio +scorpion +black and gold garden spider, Argiope aurantia +barn spider, Araneus cavaticus +garden spider, Aranea diademata +black widow, Latrodectus mactans +tarantula +wolf spider, hunting spider +tick +centipede +black grouse +ptarmigan +ruffed grouse, partridge, Bonasa umbellus +prairie chicken, prairie grouse, prairie fowl +peacock +quail +partridge +African grey, African gray, Psittacus erithacus +macaw +sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita +lorikeet +coucal +bee eater +hornbill +hummingbird +jacamar +toucan +drake +red-breasted merganser, Mergus serrator +goose +black swan, Cygnus atratus +tusker +echidna, spiny anteater, anteater +platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus +wallaby, brush kangaroo +koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus +wombat +jellyfish +sea anemone, anemone +brain coral +flatworm, platyhelminth +nematode, nematode worm, roundworm +conch +snail +slug +sea slug, nudibranch +chiton, coat-of-mail shell, sea cradle, polyplacophore +chambered nautilus, pearly nautilus, nautilus +Dungeness crab, Cancer magister +rock crab, Cancer irroratus +fiddler crab +king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica +American lobster, Northern lobster, Maine lobster, Homarus americanus +spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish +crayfish, crawfish, crawdad, crawdaddy +hermit crab +isopod +white stork, Ciconia ciconia +black stork, Ciconia nigra +spoonbill +flamingo +little blue heron, Egretta caerulea +American egret, great white heron, Egretta albus +bittern +crane +limpkin, Aramus pictus +European gallinule, Porphyrio porphyrio +American coot, marsh hen, mud hen, water hen, Fulica americana +bustard +ruddy turnstone, Arenaria interpres +red-backed sandpiper, dunlin, Erolia alpina +redshank, Tringa totanus +dowitcher +oystercatcher, oyster catcher +pelican +king penguin, Aptenodytes patagonica +albatross, mollymawk +grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus +killer whale, killer, orca, grampus, sea wolf, Orcinus orca +dugong, Dugong dugon +sea lion +Chihuahua +Japanese spaniel +Maltese dog, Maltese terrier, Maltese +Pekinese, Pekingese, Peke +Shih-Tzu +Blenheim spaniel +papillon +toy terrier +Rhodesian ridgeback +Afghan hound, Afghan +basset, basset hound +beagle +bloodhound, sleuthhound +bluetick +black-and-tan coonhound +Walker hound, Walker foxhound +English foxhound +redbone +borzoi, Russian wolfhound +Irish wolfhound +Italian greyhound +whippet +Ibizan hound, Ibizan Podenco +Norwegian elkhound, elkhound +otterhound, otter hound +Saluki, gazelle hound +Scottish deerhound, deerhound +Weimaraner +Staffordshire bullterrier, Staffordshire bull terrier +American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier +Bedlington terrier +Border terrier +Kerry blue terrier +Irish terrier +Norfolk terrier +Norwich terrier +Yorkshire terrier +wire-haired fox terrier +Lakeland terrier +Sealyham terrier, Sealyham +Airedale, Airedale terrier +cairn, cairn terrier +Australian terrier +Dandie Dinmont, Dandie Dinmont terrier +Boston bull, Boston terrier +miniature schnauzer +giant schnauzer +standard schnauzer +Scotch terrier, Scottish terrier, Scottie +Tibetan terrier, chrysanthemum dog +silky terrier, Sydney silky +soft-coated wheaten terrier +West Highland white terrier +Lhasa, Lhasa apso +flat-coated retriever +curly-coated retriever +golden retriever +Labrador retriever +Chesapeake Bay retriever +German short-haired pointer +vizsla, Hungarian pointer +English setter +Irish setter, red setter +Gordon setter +Brittany spaniel +clumber, clumber spaniel +English springer, English springer spaniel +Welsh springer spaniel +cocker spaniel, English cocker spaniel, cocker +Sussex spaniel +Irish water spaniel +kuvasz +schipperke +groenendael +malinois +briard +kelpie +komondor +Old English sheepdog, bobtail +Shetland sheepdog, Shetland sheep dog, Shetland +collie +Border collie +Bouvier des Flandres, Bouviers des Flandres +Rottweiler +German shepherd, German shepherd dog, German police dog, alsatian +Doberman, Doberman pinscher +miniature pinscher +Greater Swiss Mountain dog +Bernese mountain dog +Appenzeller +EntleBucher +boxer +bull mastiff +Tibetan mastiff +French bulldog +Great Dane +Saint Bernard, St Bernard +Eskimo dog, husky +malamute, malemute, Alaskan malamute +Siberian husky +dalmatian, coach dog, carriage dog +affenpinscher, monkey pinscher, monkey dog +basenji +pug, pug-dog +Leonberg +Newfoundland, Newfoundland dog +Great Pyrenees +Samoyed, Samoyede +Pomeranian +chow, chow chow +keeshond +Brabancon griffon +Pembroke, Pembroke Welsh corgi +Cardigan, Cardigan Welsh corgi +toy poodle +miniature poodle +standard poodle +Mexican hairless +timber wolf, grey wolf, gray wolf, Canis lupus +white wolf, Arctic wolf, Canis lupus tundrarum +red wolf, maned wolf, Canis rufus, Canis niger +coyote, prairie wolf, brush wolf, Canis latrans +dingo, warrigal, warragal, Canis dingo +dhole, Cuon alpinus +African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus +hyena, hyaena +red fox, Vulpes vulpes +kit fox, Vulpes macrotis +Arctic fox, white fox, Alopex lagopus +grey fox, gray fox, Urocyon cinereoargenteus +tabby, tabby cat +tiger cat +Persian cat +Siamese cat, Siamese +Egyptian cat +cougar, puma, catamount, mountain lion, painter, panther, Felis concolor +lynx, catamount +leopard, Panthera pardus +snow leopard, ounce, Panthera uncia +jaguar, panther, Panthera onca, Felis onca +lion, king of beasts, Panthera leo +tiger, Panthera tigris +cheetah, chetah, Acinonyx jubatus +brown bear, bruin, Ursus arctos +American black bear, black bear, Ursus americanus, Euarctos americanus +ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus +sloth bear, Melursus ursinus, Ursus ursinus +mongoose +meerkat, mierkat +tiger beetle +ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle +ground beetle, carabid beetle +long-horned beetle, longicorn, longicorn beetle +leaf beetle, chrysomelid +dung beetle +rhinoceros beetle +weevil +fly +bee +ant, emmet, pismire +grasshopper, hopper +cricket +walking stick, walkingstick, stick insect +cockroach, roach +mantis, mantid +cicada, cicala +leafhopper +lacewing, lacewing fly +dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk +damselfly +admiral +ringlet, ringlet butterfly +monarch, monarch butterfly, milkweed butterfly, Danaus plexippus +cabbage butterfly +sulphur butterfly, sulfur butterfly +lycaenid, lycaenid butterfly +starfish, sea star +sea urchin +sea cucumber, holothurian +wood rabbit, cottontail, cottontail rabbit +hare +Angora, Angora rabbit +hamster +porcupine, hedgehog +fox squirrel, eastern fox squirrel, Sciurus niger +marmot +beaver +guinea pig, Cavia cobaya +sorrel +zebra +hog, pig, grunter, squealer, Sus scrofa +wild boar, boar, Sus scrofa +warthog +hippopotamus, hippo, river horse, Hippopotamus amphibius +ox +water buffalo, water ox, Asiatic buffalo, Bubalus bubalis +bison +ram, tup +bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis +ibex, Capra ibex +hartebeest +impala, Aepyceros melampus +gazelle +Arabian camel, dromedary, Camelus dromedarius +llama +weasel +mink +polecat, fitch, foulmart, foumart, Mustela putorius +black-footed ferret, ferret, Mustela nigripes +otter +skunk, polecat, wood pussy +badger +armadillo +three-toed sloth, ai, Bradypus tridactylus +orangutan, orang, orangutang, Pongo pygmaeus +gorilla, Gorilla gorilla +chimpanzee, chimp, Pan troglodytes +gibbon, Hylobates lar +siamang, Hylobates syndactylus, Symphalangus syndactylus +guenon, guenon monkey +patas, hussar monkey, Erythrocebus patas +baboon +macaque +langur +colobus, colobus monkey +proboscis monkey, Nasalis larvatus +marmoset +capuchin, ringtail, Cebus capucinus +howler monkey, howler +titi, titi monkey +spider monkey, Ateles geoffroyi +squirrel monkey, Saimiri sciureus +Madagascar cat, ring-tailed lemur, Lemur catta +indri, indris, Indri indri, Indri brevicaudatus +Indian elephant, Elephas maximus +African elephant, Loxodonta africana +lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens +giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca +barracouta, snoek +eel +coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch +rock beauty, Holocanthus tricolor +anemone fish +sturgeon +gar, garfish, garpike, billfish, Lepisosteus osseus +lionfish +puffer, pufferfish, blowfish, globefish +abacus +abaya +academic gown, academic robe, judge's robe +accordion, piano accordion, squeeze box +acoustic guitar +aircraft carrier, carrier, flattop, attack aircraft carrier +airliner +airship, dirigible +altar +ambulance +amphibian, amphibious vehicle +analog clock +apiary, bee house +apron +ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin +assault rifle, assault gun +backpack, back pack, knapsack, packsack, rucksack, haversack +bakery, bakeshop, bakehouse +balance beam, beam +balloon +ballpoint, ballpoint pen, ballpen, Biro +Band Aid +banjo +bannister, banister, balustrade, balusters, handrail +barbell +barber chair +barbershop +barn +barometer +barrel, cask +barrow, garden cart, lawn cart, wheelbarrow +baseball +basketball +bassinet +bassoon +bathing cap, swimming cap +bath towel +bathtub, bathing tub, bath, tub +beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon +beacon, lighthouse, beacon light, pharos +beaker +bearskin, busby, shako +beer bottle +beer glass +bell cote, bell cot +bib +bicycle-built-for-two, tandem bicycle, tandem +bikini, two-piece +binder, ring-binder +binoculars, field glasses, opera glasses +birdhouse +boathouse +bobsled, bobsleigh, bob +bolo tie, bolo, bola tie, bola +bonnet, poke bonnet +bookcase +bookshop, bookstore, bookstall +bottlecap +bow +bow tie, bow-tie, bowtie +brass, memorial tablet, plaque +brassiere, bra, bandeau +breakwater, groin, groyne, mole, bulwark, seawall, jetty +breastplate, aegis, egis +broom +bucket, pail +buckle +bulletproof vest +bullet train, bullet +butcher shop, meat market +cab, hack, taxi, taxicab +caldron, cauldron +candle, taper, wax light +cannon +canoe +can opener, tin opener +cardigan +car mirror +carousel, carrousel, merry-go-round, roundabout, whirligig +carpenter's kit, tool kit +carton +car wheel +cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM +cassette +cassette player +castle +catamaran +CD player +cello, violoncello +cellular telephone, cellular phone, cellphone, cell, mobile phone +chain +chainlink fence +chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour +chain saw, chainsaw +chest +chiffonier, commode +chime, bell, gong +china cabinet, china closet +Christmas stocking +church, church building +cinema, movie theater, movie theatre, movie house, picture palace +cleaver, meat cleaver, chopper +cliff dwelling +cloak +clog, geta, patten, sabot +cocktail shaker +coffee mug +coffeepot +coil, spiral, volute, whorl, helix +combination lock +computer keyboard, keypad +confectionery, confectionary, candy store +container ship, containership, container vessel +convertible +corkscrew, bottle screw +cornet, horn, trumpet, trump +cowboy boot +cowboy hat, ten-gallon hat +cradle +crane +crash helmet +crate +crib, cot +Crock Pot +croquet ball +crutch +cuirass +dam, dike, dyke +desk +desktop computer +dial telephone, dial phone +diaper, nappy, napkin +digital clock +digital watch +dining table, board +dishrag, dishcloth +dishwasher, dish washer, dishwashing machine +disk brake, disc brake +dock, dockage, docking facility +dogsled, dog sled, dog sleigh +dome +doormat, welcome mat +drilling platform, offshore rig +drum, membranophone, tympan +drumstick +dumbbell +Dutch oven +electric fan, blower +electric guitar +electric locomotive +entertainment center +envelope +espresso maker +face powder +feather boa, boa +file, file cabinet, filing cabinet +fireboat +fire engine, fire truck +fire screen, fireguard +flagpole, flagstaff +flute, transverse flute +folding chair +football helmet +forklift +fountain +fountain pen +four-poster +freight car +French horn, horn +frying pan, frypan, skillet +fur coat +garbage truck, dustcart +gasmask, respirator, gas helmet +gas pump, gasoline pump, petrol pump, island dispenser +goblet +go-kart +golf ball +golfcart, golf cart +gondola +gong, tam-tam +gown +grand piano, grand +greenhouse, nursery, glasshouse +grille, radiator grille +grocery store, grocery, food market, market +guillotine +hair slide +hair spray +half track +hammer +hamper +hand blower, blow dryer, blow drier, hair dryer, hair drier +hand-held computer, hand-held microcomputer +handkerchief, hankie, hanky, hankey +hard disc, hard disk, fixed disk +harmonica, mouth organ, harp, mouth harp +harp +harvester, reaper +hatchet +holster +home theater, home theatre +honeycomb +hook, claw +hoopskirt, crinoline +horizontal bar, high bar +horse cart, horse-cart +hourglass +iPod +iron, smoothing iron +jack-o'-lantern +jean, blue jean, denim +jeep, landrover +jersey, T-shirt, tee shirt +jigsaw puzzle +jinrikisha, ricksha, rickshaw +joystick +kimono +knee pad +knot +lab coat, laboratory coat +ladle +lampshade, lamp shade +laptop, laptop computer +lawn mower, mower +lens cap, lens cover +letter opener, paper knife, paperknife +library +lifeboat +lighter, light, igniter, ignitor +limousine, limo +liner, ocean liner +lipstick, lip rouge +Loafer +lotion +loudspeaker, speaker, speaker unit, loudspeaker system, speaker system +loupe, jeweler's loupe +lumbermill, sawmill +magnetic compass +mailbag, postbag +mailbox, letter box +maillot +maillot, tank suit +manhole cover +maraca +marimba, xylophone +mask +matchstick +maypole +maze, labyrinth +measuring cup +medicine chest, medicine cabinet +megalith, megalithic structure +microphone, mike +microwave, microwave oven +military uniform +milk can +minibus +miniskirt, mini +minivan +missile +mitten +mixing bowl +mobile home, manufactured home +Model T +modem +monastery +monitor +moped +mortar +mortarboard +mosque +mosquito net +motor scooter, scooter +mountain bike, all-terrain bike, off-roader +mountain tent +mouse, computer mouse +mousetrap +moving van +muzzle +nail +neck brace +necklace +nipple +notebook, notebook computer +obelisk +oboe, hautboy, hautbois +ocarina, sweet potato +odometer, hodometer, mileometer, milometer +oil filter +organ, pipe organ +oscilloscope, scope, cathode-ray oscilloscope, CRO +overskirt +oxcart +oxygen mask +packet +paddle, boat paddle +paddlewheel, paddle wheel +padlock +paintbrush +pajama, pyjama, pj's, jammies +palace +panpipe, pandean pipe, syrinx +paper towel +parachute, chute +parallel bars, bars +park bench +parking meter +passenger car, coach, carriage +patio, terrace +pay-phone, pay-station +pedestal, plinth, footstall +pencil box, pencil case +pencil sharpener +perfume, essence +Petri dish +photocopier +pick, plectrum, plectron +pickelhaube +picket fence, paling +pickup, pickup truck +pier +piggy bank, penny bank +pill bottle +pillow +ping-pong ball +pinwheel +pirate, pirate ship +pitcher, ewer +plane, carpenter's plane, woodworking plane +planetarium +plastic bag +plate rack +plow, plough +plunger, plumber's helper +Polaroid camera, Polaroid Land camera +pole +police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria +poncho +pool table, billiard table, snooker table +pop bottle, soda bottle +pot, flowerpot +potter's wheel +power drill +prayer rug, prayer mat +printer +prison, prison house +projectile, missile +projector +puck, hockey puck +punching bag, punch bag, punching ball, punchball +purse +quill, quill pen +quilt, comforter, comfort, puff +racer, race car, racing car +racket, racquet +radiator +radio, wireless +radio telescope, radio reflector +rain barrel +recreational vehicle, RV, R.V. +reel +reflex camera +refrigerator, icebox +remote control, remote +restaurant, eating house, eating place, eatery +revolver, six-gun, six-shooter +rifle +rocking chair, rocker +rotisserie +rubber eraser, rubber, pencil eraser +rugby ball +rule, ruler +running shoe +safe +safety pin +saltshaker, salt shaker +sandal +sarong +sax, saxophone +scabbard +scale, weighing machine +school bus +schooner +scoreboard +screen, CRT screen +screw +screwdriver +seat belt, seatbelt +sewing machine +shield, buckler +shoe shop, shoe-shop, shoe store +shoji +shopping basket +shopping cart +shovel +shower cap +shower curtain +ski +ski mask +sleeping bag +slide rule, slipstick +sliding door +slot, one-armed bandit +snorkel +snowmobile +snowplow, snowplough +soap dispenser +soccer ball +sock +solar dish, solar collector, solar furnace +sombrero +soup bowl +space bar +space heater +space shuttle +spatula +speedboat +spider web, spider's web +spindle +sports car, sport car +spotlight, spot +stage +steam locomotive +steel arch bridge +steel drum +stethoscope +stole +stone wall +stopwatch, stop watch +stove +strainer +streetcar, tram, tramcar, trolley, trolley car +stretcher +studio couch, day bed +stupa, tope +submarine, pigboat, sub, U-boat +suit, suit of clothes +sundial +sunglass +sunglasses, dark glasses, shades +sunscreen, sunblock, sun blocker +suspension bridge +swab, swob, mop +sweatshirt +swimming trunks, bathing trunks +swing +switch, electric switch, electrical switch +syringe +table lamp +tank, army tank, armored combat vehicle, armoured combat vehicle +tape player +teapot +teddy, teddy bear +television, television system +tennis ball +thatch, thatched roof +theater curtain, theatre curtain +thimble +thresher, thrasher, threshing machine +throne +tile roof +toaster +tobacco shop, tobacconist shop, tobacconist +toilet seat +torch +totem pole +tow truck, tow car, wrecker +toyshop +tractor +trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi +tray +trench coat +tricycle, trike, velocipede +trimaran +tripod +triumphal arch +trolleybus, trolley coach, trackless trolley +trombone +tub, vat +turnstile +typewriter keyboard +umbrella +unicycle, monocycle +upright, upright piano +vacuum, vacuum cleaner +vase +vault +velvet +vending machine +vestment +viaduct +violin, fiddle +volleyball +waffle iron +wall clock +wallet, billfold, notecase, pocketbook +wardrobe, closet, press +warplane, military plane +washbasin, handbasin, washbowl, lavabo, wash-hand basin +washer, automatic washer, washing machine +water bottle +water jug +water tower +whiskey jug +whistle +wig +window screen +window shade +Windsor tie +wine bottle +wing +wok +wooden spoon +wool, woolen, woollen +worm fence, snake fence, snake-rail fence, Virginia fence +wreck +yawl +yurt +web site, website, internet site, site +comic book +crossword puzzle, crossword +street sign +traffic light, traffic signal, stoplight +book jacket, dust cover, dust jacket, dust wrapper +menu +plate +guacamole +consomme +hot pot, hotpot +trifle +ice cream, icecream +ice lolly, lolly, lollipop, popsicle +French loaf +bagel, beigel +pretzel +cheeseburger +hotdog, hot dog, red hot +mashed potato +head cabbage +broccoli +cauliflower +zucchini, courgette +spaghetti squash +acorn squash +butternut squash +cucumber, cuke +artichoke, globe artichoke +bell pepper +cardoon +mushroom +Granny Smith +strawberry +orange +lemon +fig +pineapple, ananas +banana +jackfruit, jak, jack +custard apple +pomegranate +hay +carbonara +chocolate sauce, chocolate syrup +dough +meat loaf, meatloaf +pizza, pizza pie +potpie +burrito +red wine +espresso +cup +eggnog +alp +bubble +cliff, drop, drop-off +coral reef +geyser +lakeside, lakeshore +promontory, headland, head, foreland +sandbar, sand bar +seashore, coast, seacoast, sea-coast +valley, vale +volcano +ballplayer, baseball player +groom, bridegroom +scuba diver +rapeseed +daisy +yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum +corn +acorn +hip, rose hip, rosehip +buckeye, horse chestnut, conker +coral fungus +agaric +gyromitra +stinkhorn, carrion fungus +earthstar +hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa +bolete +ear, spike, capitulum +toilet tissue, toilet paper, bathroom tissue diff --git a/samples/dnn/googlenet_python.py b/samples/dnn/googlenet_python.py deleted file mode 100644 index 81ba146891..0000000000 --- a/samples/dnn/googlenet_python.py +++ /dev/null @@ -1,24 +0,0 @@ -from __future__ import print_function -import numpy as np -import cv2 as cv -from cv2 import dnn -import timeit - -def timeit_forward(net): - print("Runtime:", timeit.timeit(lambda: net.forward(), number=10)) - -def get_class_list(): - with open('synset_words.txt', 'rt') as f: - return [x[x.find(" ") + 1:] for x in f] - -blob = dnn.blobFromImage(cv.imread('space_shuttle.jpg'), 1, (224, 224), (104, 117, 123), False) -print("Input:", blob.shape, blob.dtype) - -net = dnn.readNetFromCaffe('bvlc_googlenet.prototxt', 'bvlc_googlenet.caffemodel') -net.setInput(blob) -prob = net.forward() -#timeit_forward(net) #Uncomment to check performance - -print("Output:", prob.shape, prob.dtype) -classes = get_class_list() -print("Best match", classes[prob.argmax()]) \ No newline at end of file diff --git a/samples/dnn/object_detection.cpp b/samples/dnn/object_detection.cpp index 8f9369b007..bb6f6f08bc 100644 --- a/samples/dnn/object_detection.cpp +++ b/samples/dnn/object_detection.cpp @@ -1,8 +1,10 @@ -#include #include #include #include +#include +#include + const char* keys = "{ help h | | Print help message. }" "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}" @@ -19,7 +21,13 @@ const char* keys = "{ height | -1 | Preprocess input image by resizing to a specific height. }" "{ rgb | | Indicate that model works with RGB input images instead BGR ones. }" "{ thr | .5 | Confidence threshold. }" - "{ opencl | | Enable OpenCL }"; + "{ backend | 0 | Choose one of computation backends: " + "0: default C++ backend, " + "1: Halide language (http://halide-lang.org/), " + "2: Intel's Deep Learning Inference Engine (https://software.seek.intel.com/deep-learning-deployment)}" + "{ target | 0 | Choose one of target computation devices: " + "0: CPU target (by default)," + "1: OpenCL }"; using namespace cv; using namespace dnn; @@ -27,8 +35,6 @@ using namespace dnn; float confThreshold; std::vector classes; -void loadClasses(const std::string& file); - Net readNet(const std::string& model, const std::string& config = "", const std::string& framework = ""); void postprocess(Mat& frame, const Mat& out, Net& net); @@ -74,7 +80,7 @@ int main(int argc, char** argv) if (!ifs.is_open()) CV_Error(Error::StsError, "File " + file + " not found"); std::string line; - while (ifs >> line) + while (std::getline(ifs, line)) { classes.push_back(line); } @@ -83,17 +89,14 @@ int main(int argc, char** argv) // Load a model. CV_Assert(parser.has("model")); Net net = readNet(parser.get("model"), parser.get("config"), parser.get("framework")); - - if (parser.get("opencl")) - { - net.setPreferableTarget(DNN_TARGET_OPENCL); - } + net.setPreferableBackend(parser.get("backend")); + net.setPreferableTarget(parser.get("target")); // Create a window static const std::string kWinName = "Deep learning object detection in OpenCV"; namedWindow(kWinName, WINDOW_NORMAL); int initialConf = confThreshold * 100; - createTrackbar("Confidence threshold", kWinName, &initialConf, 99, callback); + createTrackbar("Confidence threshold, %", kWinName, &initialConf, 99, callback); // Open a video file or an image file or a camera stream. VideoCapture cap; @@ -134,7 +137,7 @@ int main(int argc, char** argv) std::vector layersTimes; double t = net.getPerfProfile(layersTimes); std::string label = format("Inference time: %.2f", t * 1000 / getTickFrequency()); - putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar()); + putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); imshow(kWinName, frame); } @@ -240,7 +243,7 @@ void callback(int pos, void*) Net readNet(const std::string& model, const std::string& config, const std::string& framework) { - std::string modelExt = model.substr(model.find('.')); + std::string modelExt = model.substr(model.rfind('.')); if (framework == "caffe" || modelExt == ".caffemodel") return readNetFromCaffe(config, model); else if (framework == "tensorflow" || modelExt == ".pb") diff --git a/samples/dnn/object_detection.py b/samples/dnn/object_detection.py index 76d6e5ab50..661395f012 100644 --- a/samples/dnn/object_detection.py +++ b/samples/dnn/object_detection.py @@ -3,6 +3,9 @@ import argparse import sys import numpy as np +backends = (cv.dnn.DNN_BACKEND_DEFAULT, cv.dnn.DNN_BACKEND_HALIDE, cv.dnn.DNN_BACKEND_INFERENCE_ENGINE) +targets = (cv.dnn.DNN_TARGET_CPU, cv.dnn.DNN_TARGET_OPENCL) + parser = argparse.ArgumentParser(description='Use this script to run object detection deep learning networks using OpenCV.') parser.add_argument('--input', help='Path to input image or video file. Skip this argument to capture frames from a camera.') parser.add_argument('--model', required=True, @@ -28,6 +31,15 @@ parser.add_argument('--height', type=int, parser.add_argument('--rgb', action='store_true', help='Indicate that model works with RGB input images instead BGR ones.') parser.add_argument('--thr', type=float, default=0.5, help='Confidence threshold') +parser.add_argument('--backend', choices=backends, default=cv.dnn.DNN_BACKEND_DEFAULT, type=int, + help="Choose one of computation backends: " + "%d: default C++ backend, " + "%d: Halide language (http://halide-lang.org/), " + "%d: Intel's Deep Learning Inference Engine (https://software.seek.intel.com/deep-learning-deployment)" % backends) +parser.add_argument('--target', choices=targets, default=cv.dnn.DNN_TARGET_CPU, type=int, + help='Choose one of target computation devices: ' + '%d: CPU target (by default), ' + '%d: OpenCL' % targets) args = parser.parse_args() # Load names of classes @@ -37,7 +49,7 @@ if args.classes: classes = f.read().rstrip('\n').split('\n') # Load a network -modelExt = args.model[args.model.find('.'):] +modelExt = args.model[args.model.rfind('.'):] if args.framework == 'caffe' or modelExt == '.caffemodel': net = cv.dnn.readNetFromCaffe(args.config, args.model) elif args.framework == 'tensorflow' or modelExt == '.pb': @@ -50,6 +62,9 @@ else: print('Cannot determine an origin framework of model from file %s' % args.model) sys.exit(0) +net.setPreferableBackend(args.backend) +net.setPreferableTarget(args.target) + confThreshold = args.thr def postprocess(frame, out): @@ -156,6 +171,6 @@ while cv.waitKey(1) < 0: # Put efficiency information. t, _ = net.getPerfProfile() label = 'Inference time: %.2f ms' % (t * 1000.0 / cv.getTickFrequency()) - cv.putText(frame, label, (0, 15), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 0)) + cv.putText(frame, label, (0, 15), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0)) cv.imshow(winName, frame) diff --git a/samples/dnn/squeezenet_halide.cpp b/samples/dnn/squeezenet_halide.cpp deleted file mode 100644 index f79c146df2..0000000000 --- a/samples/dnn/squeezenet_halide.cpp +++ /dev/null @@ -1,110 +0,0 @@ -// Sample of using Halide backend in OpenCV deep learning module. -// Based on caffe_googlenet.cpp. - -#include -#include -#include -using namespace cv; -using namespace cv::dnn; - -#include -#include -#include - -/* Find best class for the blob (i. e. class with maximal probability) */ -static void getMaxClass(const Mat &probBlob, int *classId, double *classProb) -{ - Mat probMat = probBlob.reshape(1, 1); //reshape the blob to 1x1000 matrix - Point classNumber; - - minMaxLoc(probMat, NULL, classProb, NULL, &classNumber); - *classId = classNumber.x; -} - -static std::vector readClassNames(const char *filename = "synset_words.txt") -{ - std::vector classNames; - - std::ifstream fp(filename); - if (!fp.is_open()) - { - std::cerr << "File with classes labels not found: " << filename << std::endl; - exit(-1); - } - - std::string name; - while (!fp.eof()) - { - std::getline(fp, name); - if (name.length()) - classNames.push_back( name.substr(name.find(' ')+1) ); - } - - fp.close(); - return classNames; -} - -int main(int argc, char **argv) -{ - std::string modelTxt = "train_val.prototxt"; - std::string modelBin = "squeezenet_v1.1.caffemodel"; - std::string imageFile = (argc > 1) ? argv[1] : "space_shuttle.jpg"; - - //! [Read and initialize network] - Net net = dnn::readNetFromCaffe(modelTxt, modelBin); - //! [Read and initialize network] - - //! [Check that network was read successfully] - if (net.empty()) - { - std::cerr << "Can't load network by using the following files: " << std::endl; - std::cerr << "prototxt: " << modelTxt << std::endl; - std::cerr << "caffemodel: " << modelBin << std::endl; - std::cerr << "SqueezeNet v1.1 can be downloaded from:" << std::endl; - std::cerr << "https://github.com/DeepScale/SqueezeNet/tree/master/SqueezeNet_v1.1" << std::endl; - exit(-1); - } - //! [Check that network was read successfully] - - //! [Prepare blob] - Mat img = imread(imageFile); - if (img.empty()) - { - std::cerr << "Can't read image from the file: " << imageFile << std::endl; - exit(-1); - } - if (img.channels() != 3) - { - std::cerr << "Image " << imageFile << " isn't 3-channel" << std::endl; - exit(-1); - } - - Mat inputBlob = blobFromImage(img, 1.0, Size(227, 227), Scalar(), false, false); // Convert Mat to 4-dimensional batch. - //! [Prepare blob] - - //! [Set input blob] - net.setInput(inputBlob); // Set the network input. - //! [Set input blob] - - //! [Enable Halide backend] - net.setPreferableBackend(DNN_BACKEND_HALIDE); // Tell engine to use Halide where it possible. - //! [Enable Halide backend] - - //! [Make forward pass] - Mat prob = net.forward("prob"); // Compute output. - //! [Make forward pass] - - //! [Determine the best class] - int classId; - double classProb; - getMaxClass(prob, &classId, &classProb); // Find the best class. - //! [Determine the best class] - - //! [Print results] - std::vector classNames = readClassNames(); - std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl; - std::cout << "Probability: " << classProb * 100 << "%" << std::endl; - //! [Print results] - - return 0; -} //main diff --git a/samples/dnn/tf_inception.cpp b/samples/dnn/tf_inception.cpp deleted file mode 100644 index e411cc8519..0000000000 --- a/samples/dnn/tf_inception.cpp +++ /dev/null @@ -1,154 +0,0 @@ -// This file is part of OpenCV project. -// It is subject to the license terms in the LICENSE file found in the top-level directory -// of this distribution and at http://opencv.org/license.html. - -// Copyright (C) 2016, Intel Corporation, all rights reserved. -// Third party copyrights are property of their respective owners. - -/* -Sample of using OpenCV dnn module with Tensorflow Inception model. -*/ - -#include -#include -#include -using namespace cv; -using namespace cv::dnn; - -#include -#include -#include -using namespace std; - -const String keys = - "{help h || Sample app for loading Inception TensorFlow model. " - "The model and class names list can be downloaded here: " - "https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip }" - "{model m |tensorflow_inception_graph.pb| path to TensorFlow .pb model file }" - "{image i || path to image file }" - "{i_blob | input | input blob name) }" - "{o_blob | softmax2 | output blob name) }" - "{c_names c | imagenet_comp_graph_label_strings.txt | path to file with classnames for class id }" - "{result r || path to save output blob (optional, binary format, NCHW order) }" - ; - -void getMaxClass(const Mat &probBlob, int *classId, double *classProb); -std::vector readClassNames(const char *filename); - -int main(int argc, char **argv) -{ - cv::CommandLineParser parser(argc, argv, keys); - - if (parser.has("help")) - { - parser.printMessage(); - return 0; - } - - String modelFile = parser.get("model"); - String imageFile = parser.get("image"); - String inBlobName = parser.get("i_blob"); - String outBlobName = parser.get("o_blob"); - - if (!parser.check()) - { - parser.printErrors(); - return 0; - } - - String classNamesFile = parser.get("c_names"); - String resultFile = parser.get("result"); - - //! [Initialize network] - dnn::Net net = readNetFromTensorflow(modelFile); - //! [Initialize network] - - if (net.empty()) - { - std::cerr << "Can't load network by using the mode file: " << std::endl; - std::cerr << modelFile << std::endl; - exit(-1); - } - - //! [Prepare blob] - Mat img = imread(imageFile); - if (img.empty()) - { - std::cerr << "Can't read image from the file: " << imageFile << std::endl; - exit(-1); - } - - Mat inputBlob = blobFromImage(img, 1.0f, Size(224, 224), Scalar(), true, false); //Convert Mat to batch of images - //! [Prepare blob] - inputBlob -= 117.0; - //! [Set input blob] - net.setInput(inputBlob, inBlobName); //set the network input - //! [Set input blob] - - cv::TickMeter tm; - tm.start(); - - //! [Make forward pass] - Mat result = net.forward(outBlobName); //compute output - //! [Make forward pass] - - tm.stop(); - - if (!resultFile.empty()) { - CV_Assert(result.isContinuous()); - - ofstream fout(resultFile.c_str(), ios::out | ios::binary); - fout.write((char*)result.data, result.total() * sizeof(float)); - fout.close(); - } - - std::cout << "Output blob shape " << result.size[0] << " x " << result.size[1] << " x " << result.size[2] << " x " << result.size[3] << std::endl; - std::cout << "Inference time, ms: " << tm.getTimeMilli() << std::endl; - - if (!classNamesFile.empty()) { - std::vector classNames = readClassNames(classNamesFile.c_str()); - - int classId; - double classProb; - getMaxClass(result, &classId, &classProb);//find the best class - - //! [Print results] - std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl; - std::cout << "Probability: " << classProb * 100 << "%" << std::endl; - } - return 0; -} //main - - -/* Find best class for the blob (i. e. class with maximal probability) */ -void getMaxClass(const Mat &probBlob, int *classId, double *classProb) -{ - Mat probMat = probBlob.reshape(1, 1); //reshape the blob to 1x1000 matrix - Point classNumber; - - minMaxLoc(probMat, NULL, classProb, NULL, &classNumber); - *classId = classNumber.x; -} - -std::vector readClassNames(const char *filename) -{ - std::vector classNames; - - std::ifstream fp(filename); - if (!fp.is_open()) - { - std::cerr << "File with classes labels not found: " << filename << std::endl; - exit(-1); - } - - std::string name; - while (!fp.eof()) - { - std::getline(fp, name); - if (name.length()) - classNames.push_back( name ); - } - - fp.close(); - return classNames; -}