caffe-ssh-train-test.prototxt

name: "VGG_WIDER_SSD_300x300_train"
layer {
  name: "data"
  type: "AnnotatedData"
  top: "data"
  top: "label"
  include {
    phase: TRAIN
  }
  transform_param {
    mirror: true
    mean_value: 104
    mean_value: 117
    mean_value: 123
    resize_param {
      prob: 1
      resize_mode: WARP
      height: 300
      width: 300
      interp_mode: LINEAR
      interp_mode: AREA
      interp_mode: NEAREST
      interp_mode: CUBIC
      interp_mode: LANCZOS4
    }
    emit_constraint {
      emit_type: CENTER
    }
    distort_param {
      brightness_prob: 0.5
      brightness_delta: 32
      contrast_prob: 0.5
      contrast_lower: 0.5
      contrast_upper: 1.5
      hue_prob: 0.5
      hue_delta: 18
      saturation_prob: 0.5
      saturation_lower: 0.5
      saturation_upper: 1.5
      random_order_prob: 0.0
    }
  }
  data_param {
    source: "examples/VOC0712_with_small/VOC0712_with_small_trainval_lmdb"
    batch_size: 8
    backend: LMDB
  }
  annotated_data_param {
    batch_sampler {
      max_sample: 1
      max_trials: 1
    }
    batch_sampler {
      sampler {
        min_scale: 0.3
        max_scale: 1.0
      }
      sample_constraint {
        min_jaccard_overlap: 0.1
      }
      max_sample: 1
      max_trials: 50
    }
    batch_sampler {
      sampler {
        min_scale: 0.3
        max_scale: 1.0
      }
      sample_constraint {
        min_jaccard_overlap: 0.3
      }
      max_sample: 1
      max_trials: 50
    }
    batch_sampler {
      sampler {
        min_scale: 0.3
        max_scale: 1.0
      }
      sample_constraint {
        min_jaccard_overlap: 0.5
      }
      max_sample: 1
      max_trials: 50
    }
    batch_sampler {
      sampler {
        min_scale: 0.3
        max_scale: 1.0
      }
      sample_constraint {
        min_jaccard_overlap: 0.7
      }
      max_sample: 1
      max_trials: 50
    }
    batch_sampler {
      sampler {
        min_scale: 0.3
        max_scale: 1.0
      }
      sample_constraint {
        min_jaccard_overlap: 0.9
      }
      max_sample: 1
      max_trials: 50
    }
    batch_sampler {
      sampler {
        min_scale: 0.3
        max_scale: 1.0
      }
      sample_constraint {
        max_jaccard_overlap: 1.0
      }
      max_sample: 1
      max_trials: 50
    }
    label_map_file: "data/VOC0712_with_small/labelmap_with_small_wider.prototxt"
  }
}
layer {
  name: "data"
  type: "AnnotatedData"
  top: "data"
  top: "label"
  include {
    phase: TEST
  }
  transform_param {
    mean_value: 104
    mean_value: 117
    mean_value: 123
    resize_param {
      prob: 1
      resize_mode: WARP
      height: 300
      width: 300
      interp_mode: LINEAR
    }
  }
  data_param {
    source: "examples/VOC0712_with_small/VOC0712_with_small_test_lmdb"
    batch_size: 4
    backend: LMDB
  }
  annotated_data_param {
    batch_sampler {
    }
    label_map_file: "data/VOC0712_with_small/labelmap_wider.prototxt"
  }
}
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: 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: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    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: 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"
    }
    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: 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"
    }
    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: "conv4_3_red"
  type: "Convolution"
  bottom: "conv4_3"
  top: "conv4_3_red"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.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: "conv4_3_red_relu"
  type: "ReLU"
  bottom: "conv4_3_red"
  top: "conv4_3_red"
}
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
    }
    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
    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
    }
    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
    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
    }
    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: 2
    stride: 2
  }
}


layer {
  name: "conv5_3_red"
  type: "Convolution"
  bottom: "conv5_3"
  top: "conv5_3_red"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.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: "conv5_3_red_relu"
  type: "ReLU"
  bottom: "conv5_3_red"
  top: "conv5_3_red"
}
layer {
 name: "upsample_5_3" 
 type: "Deconvolution" 
 bottom: "conv5_3_red" 
 top: "upsample_5_3"
 convolution_param {
    kernel_size: 2
    stride: 2
    num_output: 128
    group: 128
    pad: 0
    weight_filler: { 
      type: "bilinear" 
    }
    bias_term: false
  }
  param {
    lr_mult: 0
    decay_mult: 0 
  }
}
layer { 
 name: "eltwise" 
 type: "Eltwise" 
 bottom: "conv4_3_red" 
 bottom: "upsample_5_3"
 top: "conv4_3_elt" 
 eltwise_param {
    operation: SUM 
  } 
}
layer {
  name: "conv_m1"
  type: "Convolution"
  bottom: "conv4_3_elt"
  top: "conv_m1"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 128
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_m1_relu"
  type: "ReLU"
  bottom: "conv_m1"
  top: "conv_m1"
}
#####################detecion module M1####################
layer {
  name: "conv_detection_m1"
  type: "Convolution"
  bottom: "conv_m1"
  top: "conv_detection_m1"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 128
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_detection_m1_relu"
  type: "ReLU"
  bottom: "conv_detection_m1"
  top: "conv_detection_m1"
}
############context module#######################

layer {
  name: "conv_context_m1"
  type: "Convolution"
  bottom: "conv_m1"
  top: "conv_context_m1"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_m1_relu"
  type: "ReLU"
  bottom: "conv_context_m1"
  top: "conv_context_m1"
}

layer {
  name: "conv_context_1_1_m1"
  type: "Convolution"
  bottom: "conv_context_m1"
  top: "conv_context_1_1_m1"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_1_1_m1_relu"
  type: "ReLU"
  bottom: "conv_context_1_1_m1"
  top: "conv_context_1_1_m1"
}

layer {
  name: "conv_context_1_2_m1"
  type: "Convolution"
  bottom: "conv_context_m1"
  top: "conv_context_1_2_m1"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_1_2_m1_relu"
  type: "ReLU"
  bottom: "conv_context_1_2_m1"
  top: "conv_context_1_2_m1"
}
layer {
  name: "conv_context_2_1_m1"
  type: "Convolution"
  bottom: "conv_context_1_2_m1"
  top: "conv_context_2_1_m1"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_2_1_m1_relu"
  type: "ReLU"
  bottom: "conv_context_2_1_m1"
  top: "conv_context_2_1_m1"
}

layer {
  name: "concat_context_m1"
  type: "Concat"
  bottom: "conv_context_1_1_m1"
  bottom: "conv_context_2_1_m1"
  top: "concat_context_m1"
  concat_param {
    axis: 1
  }
}
layer {
  name: "concat_detection_m1"
  type: "Concat"
  bottom: "conv_detection_m1"
  bottom: "concat_context_m1"
  top: "concat_detection_m1"
  concat_param {
    axis: 1
  }
}
layer {
  name: "concat_m1_mbox_loc"
  type: "Convolution"
  bottom: "concat_detection_m1"
  top: "concat_m1_mbox_loc"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 8
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "concat_m1_mbox_loc_perm"
  type: "Permute"
  bottom: "concat_m1_mbox_loc"
  top: "concat_m1_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "concat_m1_mbox_loc_flat"
  type: "Flatten"
  bottom: "concat_m1_mbox_loc_perm"
  top: "concat_m1_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "concat_m1_mbox_conf"
  type: "Convolution"
  bottom: "concat_detection_m1"
  top: "concat_m1_mbox_conf"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 4
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "concat_m1_mbox_conf_perm"
  type: "Permute"
  bottom: "concat_m1_mbox_conf"
  top: "concat_m1_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "concat_m1_mbox_conf_flat"
  type: "Flatten"
  bottom: "concat_m1_mbox_conf_perm"
  top: "concat_m1_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "concat_m1_mbox_priorbox"
  type: "PriorBox"
  bottom: "concat_detection_m1"
  bottom: "data"
  top: "concat_m1_mbox_priorbox"
  prior_box_param {
    min_size: 16
    min_size: 32
    flip: true
    clip: false
    variance: 0.1
    variance: 0.1
    variance: 0.2
    variance: 0.2
    offset: 0.5
  }
}

##################### detection module M1 end ############################

##################### detecion module M2 ####################
layer {
  name: "conv_detection_m2"
  type: "Convolution"
  bottom: "conv5_3"
  top: "conv_detection_m2"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_detection_m2_relu"
  type: "ReLU"
  bottom: "conv_detection_m2"
  top: "conv_detection_m2"
}
############context module#######################

layer {
  name: "conv_context_m2"
  type: "Convolution"
  bottom: "conv5_3"
  top: "conv_context_m2"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_m2_relu"
  type: "ReLU"
  bottom: "conv_context_m2"
  top: "conv_context_m2"
}

layer {
  name: "conv_context_1_1_m2"
  type: "Convolution"
  bottom: "conv_context_m2"
  top: "conv_context_1_1_m2"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_1_1_m2_relu"
  type: "ReLU"
  bottom: "conv_context_1_1_m2"
  top: "conv_context_1_1_m2"
}

layer {
  name: "conv_context_1_2_m2"
  type: "Convolution"
  bottom: "conv_context_m2"
  top: "conv_context_1_2_m2"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_1_2_m2_relu"
  type: "ReLU"
  bottom: "conv_context_1_2_m2"
  top: "conv_context_1_2_m2"
}
layer {
  name: "conv_context_2_1_m2"
  type: "Convolution"
  bottom: "conv_context_1_2_m2"
  top: "conv_context_2_1_m2"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_2_1_m2_relu"
  type: "ReLU"
  bottom: "conv_context_2_1_m2"
  top: "conv_context_2_1_m2"
}

layer {
  name: "concat_context_m2"
  type: "Concat"
  bottom: "conv_context_1_1_m2"
  bottom: "conv_context_2_1_m2"
  top: "concat_context_m2"
  concat_param {
    axis: 1
  }
}
layer {
  name: "concat_detection_m2"
  type: "Concat"
  bottom: "conv_detection_m2"
  bottom: "concat_context_m2"
  top: "concat_detection_m2"
  concat_param {
    axis: 1
  }
}
layer {
  name: "concat_m2_mbox_loc"
  type: "Convolution"
  bottom: "concat_detection_m2"
  top: "concat_m2_mbox_loc"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 8
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "concat_m2_mbox_loc_perm"
  type: "Permute"
  bottom: "concat_m2_mbox_loc"
  top: "concat_m2_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "concat_m2_mbox_loc_flat"
  type: "Flatten"
  bottom: "concat_m2_mbox_loc_perm"
  top: "concat_m2_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "concat_m2_mbox_conf"
  type: "Convolution"
  bottom: "concat_detection_m2"
  top: "concat_m2_mbox_conf"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 4
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "concat_m2_mbox_conf_perm"
  type: "Permute"
  bottom: "concat_m2_mbox_conf"
  top: "concat_m2_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "concat_m2_mbox_conf_flat"
  type: "Flatten"
  bottom: "concat_m2_mbox_conf_perm"
  top: "concat_m2_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "concat_m2_mbox_priorbox"
  type: "PriorBox"
  bottom: "concat_detection_m2"
  bottom: "data"
  top: "concat_m2_mbox_priorbox"
  prior_box_param {
  	min_size: 64
  	min_size: 100
    flip: true
    clip: false
    variance: 0.1
    variance: 0.1
    variance: 0.2
    variance: 0.2
    offset: 0.5
  }
}

######################  deteciton module M2 end  ##################

#####################detecion module M3####################
layer {
  name: "conv_detection_m3"
  type: "Convolution"
  bottom: "pool5"
  top: "conv_detection_m3"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_detection_m3_relu"
  type: "ReLU"
  bottom: "conv_detection_m3"
  top: "conv_detection_m3"
}

############context module#######################

layer {
  name: "conv_context_m3"
  type: "Convolution"
  bottom: "pool5"
  top: "conv_context_m3"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_m3_relu"
  type: "ReLU"
  bottom: "conv_context_m3"
  top: "conv_context_m3"
}

layer {
  name: "conv_context_1_1_m3"
  type: "Convolution"
  bottom: "conv_context_m3"
  top: "conv_context_1_1_m3"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_1_1_m3_relu"
  type: "ReLU"
  bottom: "conv_context_1_1_m3"
  top: "conv_context_1_1_m3"
}

layer {
  name: "conv_context_1_2_m3"
  type: "Convolution"
  bottom: "conv_context_m3"
  top: "conv_context_1_2_m3"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_1_2_m3_relu"
  type: "ReLU"
  bottom: "conv_context_1_2_m3"
  top: "conv_context_1_2_m3"
}
layer {
  name: "conv_context_2_1_m3"
  type: "Convolution"
  bottom: "conv_context_1_2_m3"
  top: "conv_context_2_1_m3"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "conv_context_2_1_m3_relu"
  type: "ReLU"
  bottom: "conv_context_2_1_m3"
  top: "conv_context_2_1_m3"
}

layer {
  name: "concat_context_m3"
  type: "Concat"
  bottom: "conv_context_1_1_m3"
  bottom: "conv_context_2_1_m3"
  top: "concat_context_m3"
  concat_param {
    axis: 1
  }
}
layer {
  name: "concat_detection_m3"
  type: "Concat"
  bottom: "conv_detection_m3"
  bottom: "concat_context_m3"
  top: "concat_detection_m3"
  concat_param {
    axis: 1
  }
}

layer {
  name: "concat_m3_mbox_loc"
  type: "Convolution"
  bottom: "concat_detection_m3"
  top: "concat_m3_mbox_loc"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 8
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "concat_m3_mbox_loc_perm"
  type: "Permute"
  bottom: "concat_m3_mbox_loc"
  top: "concat_m3_mbox_loc_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "concat_m3_mbox_loc_flat"
  type: "Flatten"
  bottom: "concat_m3_mbox_loc_perm"
  top: "concat_m3_mbox_loc_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "concat_m3_mbox_conf"
  type: "Convolution"
  bottom: "concat_detection_m3"
  top: "concat_m3_mbox_conf"
  param {
    lr_mult: 0.1
    decay_mult: 1
  }
  param {
    lr_mult: 0.2
    decay_mult: 0
  }
  convolution_param {
    num_output: 4
    pad: 0
    kernel_size: 1
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "concat_m3_mbox_conf_perm"
  type: "Permute"
  bottom: "concat_m3_mbox_conf"
  top: "concat_m3_mbox_conf_perm"
  permute_param {
    order: 0
    order: 2
    order: 3
    order: 1
  }
}
layer {
  name: "concat_m3_mbox_conf_flat"
  type: "Flatten"
  bottom: "concat_m3_mbox_conf_perm"
  top: "concat_m3_mbox_conf_flat"
  flatten_param {
    axis: 1
  }
}
layer {
  name: "concat_m3_mbox_priorbox"
  type: "PriorBox"
  bottom: "concat_detection_m3"
  bottom: "data"
  top: "concat_m3_mbox_priorbox"
  prior_box_param {
    min_size: 190
    min_size: 260
    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: "concat_m1_mbox_loc_flat"
  bottom: "concat_m2_mbox_loc_flat"
  bottom: "concat_m3_mbox_loc_flat"
  top: "mbox_loc"
  concat_param {
    axis: 1
  }
}
layer {
  name: "mbox_conf"
  type: "Concat"
  bottom: "concat_m1_mbox_conf_flat"
  bottom: "concat_m2_mbox_conf_flat"
  bottom: "concat_m3_mbox_conf_flat"
  top: "mbox_conf"
  concat_param {
    axis: 1
  }
}
layer {
  name: "mbox_priorbox"
  type: "Concat"
  bottom: "concat_m1_mbox_priorbox"
  bottom: "concat_m2_mbox_priorbox"
  bottom: "concat_m3_mbox_priorbox"
  top: "mbox_priorbox"
  concat_param {
    axis: 2
  }
}
layer {
  name: "mbox_loss"
  type: "MultiBoxLoss"
  bottom: "mbox_loc"
  bottom: "mbox_conf"
  bottom: "mbox_priorbox"
  bottom: "label"
  top: "mbox_loss"
  include {
    phase: TRAIN
  }
  propagate_down: true
  propagate_down: true
  propagate_down: false
  propagate_down: false
  loss_param {
    normalization: VALID
  }
  multibox_loss_param {
    loc_loss_type: SMOOTH_L1
    conf_loss_type: SOFTMAX
    loc_weight: 1.0
    num_classes: 2
    share_location: true
    match_type: PER_PREDICTION
    overlap_threshold: 0.5
    use_prior_for_matching: true
    background_label_id: 0
    use_difficult_gt: true
    neg_pos_ratio: 3.0
    neg_overlap: 0.3
    code_type: CENTER_SIZE
    ignore_cross_boundary_bbox: false
    mining_type: MAX_NEGATIVE
  }
}
###############################test#################33
layer {
  name: "mbox_conf_reshape"
  type: "Reshape"
  bottom: "mbox_conf"
  top: "mbox_conf_reshape"
  include {
    phase: TEST
  }
  reshape_param {
    shape {
      dim: 0
      dim: -1
      dim: 2
    }
  }
}
layer {
  name: "mbox_conf_softmax"
  type: "Softmax"
  bottom: "mbox_conf_reshape"
  top: "mbox_conf_softmax"
  include {
    phase: TEST
  }
  softmax_param {
    axis: 2
  }
}
layer {
  name: "mbox_conf_flatten"
  type: "Flatten"
  bottom: "mbox_conf_softmax"
  top: "mbox_conf_flatten"
  include {
    phase: TEST
  }
  flatten_param {
    axis: 1
  }
}
layer {
  name: "detection_out"
  type: "DetectionOutput"
  bottom: "mbox_loc"
  bottom: "mbox_conf_flatten"
  bottom: "mbox_priorbox"
  top: "detection_out"
  include {
    phase: TEST
  }
  detection_output_param {
    num_classes: 2
    share_location: true
    background_label_id: 0
    nms_param {
      nms_threshold: 0.45
      top_k: 400
    }
    code_type: CENTER_SIZE
    keep_top_k: 200
    confidence_threshold: 0.01
  }
}
layer {
  name: "detection_eval"
  type: "DetectionEvaluate"
  bottom: "detection_out"
  bottom: "label"
  top: "detection_eval"
  include {
    phase: TEST
  }
  detection_evaluate_param {
    num_classes: 2
    background_label_id: 0
    overlap_threshold: 0.5
    evaluate_difficult_gt: false
    name_size_file: "data/VOC0712_with_small/test_name_size.txt"
  }
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值