Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[dnn] Ability to load FSSD pre trained caffe model with "Interp" layer #10985

Closed
fabito opened this issue Mar 5, 2018 · 2 comments
Closed

[dnn] Ability to load FSSD pre trained caffe model with "Interp" layer #10985

fabito opened this issue Mar 5, 2018 · 2 comments

Comments

@fabito
Copy link

fabito commented Mar 5, 2018

I'm trying to load a FSSD: Feature Fusion Single Shot Multibox Detector pre trained caffe model.
But I'm getting the following error:

[libprotobuf ERROR /io/opencv/3rdparty/protobuf/src/google/protobuf/text_format.cc:298] Error parsing text-format opencv_caffe.NetParameter: 751:16: Message type "opencv_caffe.LayerParameter" has no field named "interp_param".
OpenCV Error: Unspecified error (FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: /zoo/caffe-zoo/FSSD_512_COCO/deploy.prototxt) in ReadNetParamsFromTextFileOrDie, file /io/opencv/modules/dnn/src/caffe/caffe_io.cpp, line 1145
Traceback (most recent call last):
  File "vigilante/play.py", line 86, in <module>
    prototxt='/zoo/caffe-zoo/FSSD_512_COCO/deploy.prototxt')
  File "/usr/src/app/vigilante/object_detector.py", line 192, in __init__
    self.net = cv2.dnn.readNetFromCaffe(prototxt, caffemodel)
cv2.error: /io/opencv/modules/dnn/src/caffe/caffe_io.cpp:1145: error: (-2) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: /zoo/caffe-zoo/FSSD_512_COCO/deploy.prototxt in function ReadNetParamsFromTextFileOrDie
deploy.prototxt
name: "VGG_COCO_SSD_FPN_NO33_WOP512x512_deploy"
input: "data"
input_shape {
  dim: 1
  dim: 3
  dim: 512
  dim: 512
}
layer {
  name: "conv1_1"
  type: "Convolution"
  bottom: "data"
  top: "conv1_1"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu1_1"
  type: "ReLU"
  bottom: "conv1_1"
  top: "conv1_1"
}
layer {
  name: "conv1_2"
  type: "Convolution"
  bottom: "conv1_1"
  top: "conv1_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu1_2"
  type: "ReLU"
  bottom: "conv1_2"
  top: "conv1_2"
}
layer {
  name: "pool1"
  type: "Pooling"
  bottom: "conv1_2"
  top: "pool1"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv2_1"
  type: "Convolution"
  bottom: "pool1"
  top: "conv2_1"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 128
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu2_1"
  type: "ReLU"
  bottom: "conv2_1"
  top: "conv2_1"
}
layer {
  name: "conv2_2"
  type: "Convolution"
  bottom: "conv2_1"
  top: "conv2_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 128
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu2_2"
  type: "ReLU"
  bottom: "conv2_2"
  top: "conv2_2"
}
layer {
  name: "pool2"
  type: "Pooling"
  bottom: "conv2_2"
  top: "pool2"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv3_1"
  type: "Convolution"
  bottom: "pool2"
  top: "conv3_1"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu3_1"
  type: "ReLU"
  bottom: "conv3_1"
  top: "conv3_1"
}
layer {
  name: "conv3_2"
  type: "Convolution"
  bottom: "conv3_1"
  top: "conv3_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.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.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu3_3"
  type: "ReLU"
  bottom: "conv3_3"
  top: "conv3_3"
}
layer {
  name: "pool3"
  type: "Pooling"
  bottom: "conv3_3"
  top: "pool3"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv4_1"
  type: "Convolution"
  bottom: "pool3"
  top: "conv4_1"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu4_1"
  type: "ReLU"
  bottom: "conv4_1"
  top: "conv4_1"
}
layer {
  name: "conv4_2"
  type: "Convolution"
  bottom: "conv4_1"
  top: "conv4_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.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.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu4_3"
  type: "ReLU"
  bottom: "conv4_3"
  top: "conv4_3"
}
layer {
  name: "pool4"
  type: "Pooling"
  bottom: "conv4_3"
  top: "pool4"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv5_1"
  type: "Convolution"
  bottom: "pool4"
  top: "conv5_1"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
    dilation: 1
  }
}
layer {
  name: "relu5_1"
  type: "ReLU"
  bottom: "conv5_1"
  top: "conv5_1"
}
layer {
  name: "conv5_2"
  type: "Convolution"
  bottom: "conv5_1"
  top: "conv5_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
    dilation: 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.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
    dilation: 1
  }
}
layer {
  name: "relu5_3"
  type: "ReLU"
  bottom: "conv5_3"
  top: "conv5_3"
}
layer {
  name: "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.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 1024
    pad: 6
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.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.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 1024
    kernel_size: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.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.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "conv6_1_relu"
  type: "ReLU"
  bottom: "conv6_1"
  top: "conv6_1"
}
layer {
  name: "conv6_2"
  type: "Convolution"
  bottom: "conv6_1"
  top: "conv6_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "conv6_2_relu"
  type: "ReLU"
  bottom: "conv6_2"
  top: "conv6_2"
}
layer {
  name: "conv7_1"
  type: "Convolution"
  bottom: "conv6_2"
  top: "conv7_1"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 128
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "conv7_1_relu"
  type: "ReLU"
  bottom: "conv7_1"
  top: "conv7_1"
}
layer {
  name: "conv7_2"
  type: "Convolution"
  bottom: "conv7_1"
  top: "conv7_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 2
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "conv7_2_relu"
  type: "ReLU"
  bottom: "conv7_2"
  top: "conv7_2"
}
layer {
  name: "conv4_3_reduce"
  type: "Convolution"
  bottom: "conv4_3"
  top: "conv4_3_reduce"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "conv4_3_reduce_relu"
  type: "ReLU"
  bottom: "conv4_3_reduce"
  top: "conv4_3_reduce"
}
layer {
  name: "fc7_reduce"
  type: "Convolution"
  bottom: "fc7"
  top: "fc7_reduce"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fc7_reduce_relu"
  type: "ReLU"
  bottom: "fc7_reduce"
  top: "fc7_reduce"
}
layer {
  name: "fc7_us"
  type: "Interp"
  bottom: "fc7_reduce"
  top: "fc7_us"
  interp_param {
    height: 64
    width: 64
  }
}
layer {
  name: "conv7_2_us"
  type: "Interp"
  bottom: "conv7_2"
  top: "conv7_2_us"
  interp_param {
    height: 64
    width: 64
  }
}
layer {
  name: "fea_concat"
  type: "Concat"
  bottom: "conv4_3_reduce"
  bottom: "fc7_us"
  bottom: "conv7_2_us"
  top: "fea_concat"
  concat_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn"
  type: "BatchNorm"
  bottom: "fea_concat"
  top: "fea_concat"
}
layer {
  name: "fea_concat_bn_ds_1"
  type: "Convolution"
  bottom: "fea_concat"
  top: "fea_concat_bn_ds_1"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_1_relu"
  type: "ReLU"
  bottom: "fea_concat_bn_ds_1"
  top: "fea_concat_bn_ds_1"
}
layer {
  name: "fea_concat_bn_ds_2"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_1"
  top: "fea_concat_bn_ds_2"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    stride: 2
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_2_relu"
  type: "ReLU"
  bottom: "fea_concat_bn_ds_2"
  top: "fea_concat_bn_ds_2"
}
layer {
  name: "fea_concat_bn_ds_4"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_2"
  top: "fea_concat_bn_ds_4"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 2
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_4_relu"
  type: "ReLU"
  bottom: "fea_concat_bn_ds_4"
  top: "fea_concat_bn_ds_4"
}
layer {
  name: "fea_concat_bn_ds_8"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_4"
  top: "fea_concat_bn_ds_8"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 2
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_8_relu"
  type: "ReLU"
  bottom: "fea_concat_bn_ds_8"
  top: "fea_concat_bn_ds_8"
}
layer {
  name: "fea_concat_bn_ds_16"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_8"
  top: "fea_concat_bn_ds_16"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 2
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_16_relu"
  type: "ReLU"
  bottom: "fea_concat_bn_ds_16"
  top: "fea_concat_bn_ds_16"
}
layer {
  name: "fea_concat_bn_ds_32"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_16"
  top: "fea_concat_bn_ds_32"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 2
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_32_relu"
  type: "ReLU"
  bottom: "fea_concat_bn_ds_32"
  top: "fea_concat_bn_ds_32"
}
layer {
  name: "fea_concat_bn_ds_64"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_32"
  top: "fea_concat_bn_ds_64"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 4
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_64_relu"
  type: "ReLU"
  bottom: "fea_concat_bn_ds_64"
  top: "fea_concat_bn_ds_64"
}
layer {
  name: "fea_concat_bn_ds_1_mbox_loc"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_1"
  top: "fea_concat_bn_ds_1_mbox_loc"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 16
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_1_mbox_loc_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_1_mbox_loc"
  top: "fea_concat_bn_ds_1_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_1_mbox_loc_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_1_mbox_loc_perm"
  top: "fea_concat_bn_ds_1_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_1_mbox_conf"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_1"
  top: "fea_concat_bn_ds_1_mbox_conf"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 324
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_1_mbox_conf_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_1_mbox_conf"
  top: "fea_concat_bn_ds_1_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_1_mbox_conf_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_1_mbox_conf_perm"
  top: "fea_concat_bn_ds_1_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_1_mbox_priorbox"
  type: "PriorBox"
  bottom: "fea_concat_bn_ds_1"
  bottom: "data"
  top: "fea_concat_bn_ds_1_mbox_priorbox"
  prior_box_param {
    min_size: 35.8400001526
    max_size: 76.8000030518
    aspect_ratio: 2.0
    flip: true
    clip: false
    variance: 0.10000000149
    variance: 0.10000000149
    variance: 0.20000000298
    variance: 0.20000000298
    offset: 0.5
  }
}
layer {
  name: "fea_concat_bn_ds_2_mbox_loc"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_2"
  top: "fea_concat_bn_ds_2_mbox_loc"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 24
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_2_mbox_loc_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_2_mbox_loc"
  top: "fea_concat_bn_ds_2_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_2_mbox_loc_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_2_mbox_loc_perm"
  top: "fea_concat_bn_ds_2_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_2_mbox_conf"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_2"
  top: "fea_concat_bn_ds_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: 486
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_2_mbox_conf_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_2_mbox_conf"
  top: "fea_concat_bn_ds_2_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_2_mbox_conf_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_2_mbox_conf_perm"
  top: "fea_concat_bn_ds_2_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_2_mbox_priorbox"
  type: "PriorBox"
  bottom: "fea_concat_bn_ds_2"
  bottom: "data"
  top: "fea_concat_bn_ds_2_mbox_priorbox"
  prior_box_param {
    min_size: 76.8000030518
    max_size: 153.600006104
    aspect_ratio: 2.0
    aspect_ratio: 3.0
    flip: true
    clip: false
    variance: 0.10000000149
    variance: 0.10000000149
    variance: 0.20000000298
    variance: 0.20000000298
    offset: 0.5
  }
}
layer {
  name: "fea_concat_bn_ds_4_mbox_loc"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_4"
  top: "fea_concat_bn_ds_4_mbox_loc"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 24
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_4_mbox_loc_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_4_mbox_loc"
  top: "fea_concat_bn_ds_4_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_4_mbox_loc_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_4_mbox_loc_perm"
  top: "fea_concat_bn_ds_4_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_4_mbox_conf"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_4"
  top: "fea_concat_bn_ds_4_mbox_conf"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 486
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_4_mbox_conf_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_4_mbox_conf"
  top: "fea_concat_bn_ds_4_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_4_mbox_conf_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_4_mbox_conf_perm"
  top: "fea_concat_bn_ds_4_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_4_mbox_priorbox"
  type: "PriorBox"
  bottom: "fea_concat_bn_ds_4"
  bottom: "data"
  top: "fea_concat_bn_ds_4_mbox_priorbox"
  prior_box_param {
    min_size: 153.600006104
    max_size: 230.399993896
    aspect_ratio: 2.0
    aspect_ratio: 3.0
    flip: true
    clip: false
    variance: 0.10000000149
    variance: 0.10000000149
    variance: 0.20000000298
    variance: 0.20000000298
    offset: 0.5
  }
}
layer {
  name: "fea_concat_bn_ds_8_mbox_loc"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_8"
  top: "fea_concat_bn_ds_8_mbox_loc"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 24
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_8_mbox_loc_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_8_mbox_loc"
  top: "fea_concat_bn_ds_8_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_8_mbox_loc_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_8_mbox_loc_perm"
  top: "fea_concat_bn_ds_8_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_8_mbox_conf"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_8"
  top: "fea_concat_bn_ds_8_mbox_conf"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 486
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_8_mbox_conf_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_8_mbox_conf"
  top: "fea_concat_bn_ds_8_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_8_mbox_conf_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_8_mbox_conf_perm"
  top: "fea_concat_bn_ds_8_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_8_mbox_priorbox"
  type: "PriorBox"
  bottom: "fea_concat_bn_ds_8"
  bottom: "data"
  top: "fea_concat_bn_ds_8_mbox_priorbox"
  prior_box_param {
    min_size: 230.399993896
    max_size: 307.200012207
    aspect_ratio: 2.0
    aspect_ratio: 3.0
    flip: true
    clip: false
    variance: 0.10000000149
    variance: 0.10000000149
    variance: 0.20000000298
    variance: 0.20000000298
    offset: 0.5
  }
}
layer {
  name: "fea_concat_bn_ds_16_mbox_loc"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_16"
  top: "fea_concat_bn_ds_16_mbox_loc"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 24
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_16_mbox_loc_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_16_mbox_loc"
  top: "fea_concat_bn_ds_16_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_16_mbox_loc_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_16_mbox_loc_perm"
  top: "fea_concat_bn_ds_16_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_16_mbox_conf"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_16"
  top: "fea_concat_bn_ds_16_mbox_conf"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 486
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_16_mbox_conf_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_16_mbox_conf"
  top: "fea_concat_bn_ds_16_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_16_mbox_conf_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_16_mbox_conf_perm"
  top: "fea_concat_bn_ds_16_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_16_mbox_priorbox"
  type: "PriorBox"
  bottom: "fea_concat_bn_ds_16"
  bottom: "data"
  top: "fea_concat_bn_ds_16_mbox_priorbox"
  prior_box_param {
    min_size: 307.200012207
    max_size: 384.0
    aspect_ratio: 2.0
    aspect_ratio: 3.0
    flip: true
    clip: false
    variance: 0.10000000149
    variance: 0.10000000149
    variance: 0.20000000298
    variance: 0.20000000298
    offset: 0.5
  }
}
layer {
  name: "fea_concat_bn_ds_32_mbox_loc"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_32"
  top: "fea_concat_bn_ds_32_mbox_loc"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 16
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_32_mbox_loc_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_32_mbox_loc"
  top: "fea_concat_bn_ds_32_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_32_mbox_loc_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_32_mbox_loc_perm"
  top: "fea_concat_bn_ds_32_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_32_mbox_conf"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_32"
  top: "fea_concat_bn_ds_32_mbox_conf"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 324
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_32_mbox_conf_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_32_mbox_conf"
  top: "fea_concat_bn_ds_32_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_32_mbox_conf_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_32_mbox_conf_perm"
  top: "fea_concat_bn_ds_32_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_32_mbox_priorbox"
  type: "PriorBox"
  bottom: "fea_concat_bn_ds_32"
  bottom: "data"
  top: "fea_concat_bn_ds_32_mbox_priorbox"
  prior_box_param {
    min_size: 384.0
    max_size: 460.799987793
    aspect_ratio: 2.0
    flip: true
    clip: false
    variance: 0.10000000149
    variance: 0.10000000149
    variance: 0.20000000298
    variance: 0.20000000298
    offset: 0.5
  }
}
layer {
  name: "fea_concat_bn_ds_64_mbox_loc"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_64"
  top: "fea_concat_bn_ds_64_mbox_loc"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 16
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_64_mbox_loc_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_64_mbox_loc"
  top: "fea_concat_bn_ds_64_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_64_mbox_loc_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_64_mbox_loc_perm"
  top: "fea_concat_bn_ds_64_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_64_mbox_conf"
  type: "Convolution"
  bottom: "fea_concat_bn_ds_64"
  top: "fea_concat_bn_ds_64_mbox_conf"
  param {
    lr_mult: 1.0
    decay_mult: 1.0
  }
  param {
    lr_mult: 2.0
    decay_mult: 0.0
  }
  convolution_param {
    num_output: 324
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "fea_concat_bn_ds_64_mbox_conf_perm"
  type: "Permute"
  bottom: "fea_concat_bn_ds_64_mbox_conf"
  top: "fea_concat_bn_ds_64_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "fea_concat_bn_ds_64_mbox_conf_flat"
  type: "Flatten"
  bottom: "fea_concat_bn_ds_64_mbox_conf_perm"
  top: "fea_concat_bn_ds_64_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "fea_concat_bn_ds_64_mbox_priorbox"
  type: "PriorBox"
  bottom: "fea_concat_bn_ds_64"
  bottom: "data"
  top: "fea_concat_bn_ds_64_mbox_priorbox"
  prior_box_param {
    min_size: 460.799987793
    max_size: 537.599975586
    aspect_ratio: 2.0
    flip: true
    clip: false
    variance: 0.10000000149
    variance: 0.10000000149
    variance: 0.20000000298
    variance: 0.20000000298
    offset: 0.5
  }
}
layer {
  name: "mbox_loc"
  type: "Concat"
  bottom: "fea_concat_bn_ds_1_mbox_loc_flat"
  bottom: "fea_concat_bn_ds_2_mbox_loc_flat"
  bottom: "fea_concat_bn_ds_4_mbox_loc_flat"
  bottom: "fea_concat_bn_ds_8_mbox_loc_flat"
  bottom: "fea_concat_bn_ds_16_mbox_loc_flat"
  bottom: "fea_concat_bn_ds_32_mbox_loc_flat"
  bottom: "fea_concat_bn_ds_64_mbox_loc_flat"
  top: "mbox_loc"
  concat_param {
    axis: 1
  }
}
layer {
  name: "mbox_conf"
  type: "Concat"
  bottom: "fea_concat_bn_ds_1_mbox_conf_flat"
  bottom: "fea_concat_bn_ds_2_mbox_conf_flat"
  bottom: "fea_concat_bn_ds_4_mbox_conf_flat"
  bottom: "fea_concat_bn_ds_8_mbox_conf_flat"
  bottom: "fea_concat_bn_ds_16_mbox_conf_flat"
  bottom: "fea_concat_bn_ds_32_mbox_conf_flat"
  bottom: "fea_concat_bn_ds_64_mbox_conf_flat"
  top: "mbox_conf"
  concat_param {
    axis: 1
  }
}
layer {
  name: "mbox_priorbox"
  type: "Concat"
  bottom: "fea_concat_bn_ds_1_mbox_priorbox"
  bottom: "fea_concat_bn_ds_2_mbox_priorbox"
  bottom: "fea_concat_bn_ds_4_mbox_priorbox"
  bottom: "fea_concat_bn_ds_8_mbox_priorbox"
  bottom: "fea_concat_bn_ds_16_mbox_priorbox"
  bottom: "fea_concat_bn_ds_32_mbox_priorbox"
  bottom: "fea_concat_bn_ds_64_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: 81
    }
  }
}
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: 81
    share_location: true
    background_label_id: 0
    nms_param {
      nms_threshold: 0.449999988079
      top_k: 400
    }
    save_output_param {
      output_directory: "jobs/VGGNet/SSD_FPN_NO33_WOP512x512/1025/predict_ss"
      output_name_prefix: "detections_minival_fssd512_"
      output_format: "COCO"
      label_map_file: "data/coco/labelmap_coco.prototxt"
      name_size_file: "data/coco/minival2014_name_size.txt"
      num_test_image: 5000
    }
    code_type: CENTER_SIZE
    keep_top_k: 200
    confidence_threshold: 0.00999999977648
  }
}

@dkurt
Copy link
Member

dkurt commented Mar 21, 2018

@fabito, Many thanks! Looks like Interp layer does not match with any OpenCV's resize interpolation. I'm going to suggest you try custom layers introduced at #11129. You may find Interp layer implementation in the tutorial there.

@dkurt
Copy link
Member

dkurt commented May 4, 2018

@dkurt dkurt closed this as completed May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants