Skip to content

Commit

Permalink
pretrained vgg model deploy files
Browse files Browse the repository at this point in the history
  • Loading branch information
s-gupta committed Jun 1, 2015
1 parent c60565e commit ad603e1
Show file tree
Hide file tree
Showing 3 changed files with 410 additions and 0 deletions.
228 changes: 228 additions & 0 deletions output/vgg/mil_finetune.prototxt
@@ -0,0 +1,228 @@
name: "VGG_ILSVRC_16_layers"
layers {
name: "data" type: MIL_DATA top: "data" top: "label"
mil_data_param {
images_per_batch: 1 n_classes: 1000

label_file: "protofiles/v39/labels_train.all.h5"
# source: "protofiles/v39/train.all_train.txt"
source: "protofiles/v39/train.all_all.txt"
randomize: 1

root_dir: "/data0/sgupta/msrdata/JPEGImages/"
# root_dir: "/work5/sgupta/msr-post-cvpr/coco-data/JPEGImages/"
ext: "jpg"
}
transform_param {
mirror: true
crop_size: 565
mean_value: 103.939 mean_value: 116.779 mean_value: 123.68
}
include: { phase: TRAIN }
}

layers {
name: "data"
type: MIL_DATA
top: "data"
top: "label"
mil_data_param {
images_per_batch: 1
n_classes: 1000

# source: "protofiles/v39/val.all_all.txt"
# label_file: "protofiles/v39/labels_val.all.h5"
# randomize: 0
# root_dir: "/data0/sgupta/msrdata/JPEGImages/"

# label_file: "protofiles/v39/labels_val.all.h5"
# source: "protofiles/v39/val.all_all.txt"
# randomize: 0
# root_dir: "/data0/sgupta/msrdata/JPEGImages/"

# label_file: "protofiles/v39/labels_val.new.h5"
# source: "protofiles/v39/val.new_all.txt"
# randomize: 0
# root_dir: "/data1/sgupta/coco/images/"

label_file: "protofiles/v39/labels_all.pascal.h5"
source: "protofiles/v39/all.pascal_all.txt"
randomize: 0
root_dir: "/data1/sgupta/pascal1k/JPEGImages/"

ext: "jpg"

num_scales: 1
scale_factor: 0.707
}
transform_param {
mirror: true
crop_size: 565
mean_value: 103.939 mean_value: 116.779 mean_value: 123.68
}
include: { phase: TEST }
}

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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
layer { name: "relu5_3" type: "ReLU" bottom: "conv5_3" top: "conv5_3" }

layer {
bottom: "conv5_3" top: "pool5" name: "pool5" type: "Pooling"
pooling_param { pool: MAX kernel_size: 2 stride: 2 }
}

layer {
bottom: "pool5" top: "fc6-conv" name: "fc6-conv" type: "Convolution"
convolution_param { num_output: 4096 pad: 0 kernel_size: 7 }
}

layer { bottom: "fc6-conv" top: "fc6-conv" name: "relu6" type: "ReLU" }

layer {
bottom: "fc6-conv" top: "fc6-conv" name: "drop6" type: "Dropout"
dropout_param { dropout_ratio: 0.5 }
}
layer {
bottom: "fc6-conv" top: "fc7-conv" name: "fc7-conv" type: "Convolution"
convolution_param { num_output: 4096 pad: 0 kernel_size: 1 }
}
layer { bottom: "fc7-conv" top: "fc7-conv" name: "relu7" type: "ReLU" }
layer {
bottom: "fc7-conv" top: "fc7-conv" name: "drop7" type: "Dropout"
dropout_param { dropout_ratio: 0.5 }
}

layer {
name: "fc8_coco" type: "Convolution" bottom: "fc7-conv" top: "fc8-conv"
param{ lr_mult: 10 decay_mult: 1 }
param{ lr_mult: 20 decay_mult: 0 }
convolution_param {
num_output: 1000 kernel_size: 1
weight_filler { type: "gaussian" std: 0.001 }
bias_filler { type: "constant" value: -6.58 }
}
}

layer { name: "sigmoid" type: "Sigmoid" bottom: "fc8-conv" top:
"fc8-conv-sigmoid" }

layer{
name: "mil" type: "MIL" bottom: "fc8-conv-sigmoid" top: "mil"
mil_param{ type: NOR }
}

layer{
name: "mil-max" type: "MIL" bottom: "fc8-conv" top: "mil_max"
mil_param{ type: MAX }
}

layers { name: "loss" type: CROSS_ENTROPY_LOSS bottom: "mil" bottom: "label"
loss_weight: 20 }
167 changes: 167 additions & 0 deletions output/vgg/mil_finetune.prototxt.deploy
@@ -0,0 +1,167 @@
name: "VGG_ILSVRC_16_layers"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 565
input_dim: 565

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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
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 }
}
layer { name: "relu5_3" type: "ReLU" bottom: "conv5_3" top: "conv5_3" }

layer {
bottom: "conv5_3" top: "pool5" name: "pool5" type: "Pooling"
pooling_param { pool: MAX kernel_size: 2 stride: 2 }
}

layer {
bottom: "pool5" top: "fc6-conv" name: "fc6-conv" type: "Convolution"
convolution_param { num_output: 4096 pad: 0 kernel_size: 7 }
}

layer { bottom: "fc6-conv" top: "fc6-conv" name: "relu6" type: "ReLU" }

layer {
bottom: "fc6-conv" top: "fc6-conv" name: "drop6" type: "Dropout"
dropout_param { dropout_ratio: 0.5 }
}
layer {
bottom: "fc6-conv" top: "fc7-conv" name: "fc7-conv" type: "Convolution"
convolution_param { num_output: 4096 pad: 0 kernel_size: 1 }
}
layer { bottom: "fc7-conv" top: "fc7-conv" name: "relu7" type: "ReLU" }
layer {
bottom: "fc7-conv" top: "fc7-conv" name: "drop7" type: "Dropout"
dropout_param { dropout_ratio: 0.5 }
}

layer {
name: "fc8_coco" type: "Convolution" bottom: "fc7-conv" top: "fc8-conv"
param{ lr_mult: 10 decay_mult: 1 }
param{ lr_mult: 20 decay_mult: 0 }
convolution_param {
num_output: 1000 kernel_size: 1
weight_filler { type: "gaussian" std: 0.001 }
bias_filler { type: "constant" value: -6.58 }
}
}

layer { name: "sigmoid" type: "Sigmoid" bottom: "fc8-conv" top:
"fc8-conv-sigmoid" }

layer{
name: "mil" type: "MIL" bottom: "fc8-conv-sigmoid" top: "mil"
mil_param{ type: NOR }
}

layer{
name: "mil-max" type: "MIL" bottom: "fc8-conv" top: "mil_max"
mil_param{ type: MAX }
}

0 comments on commit ad603e1

Please sign in to comment.