diff --git a/models/brody/deploy.prototxt b/models/brody/deploy.prototxt index 85e72f10774..14634682829 100644 --- a/models/brody/deploy.prototxt +++ b/models/brody/deploy.prototxt @@ -1,15 +1,13 @@ -name: "BrodyNet" +# This is not brody's net. +name: "AlexNet" input: "data" input_dim: 10 input_dim: 3 -input_dim: 480 -input_dim: 640 - +input_dim: 227 +input_dim: 227 layers { name: "conv1" type: CONVOLUTION - bottom: "data" - top: "conv1" blobs_lr: 1 blobs_lr: 2 weight_decay: 1 @@ -18,15 +16,9 @@ layers { num_output: 96 kernel_size: 11 stride: 4 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 0.1 - } } + bottom: "data" + top: "conv1" } layers { name: "relu1" @@ -34,33 +26,31 @@ layers { bottom: "conv1" top: "conv1" } -layers { - name: "pool1" - type: POOLING - bottom: "conv1" - top: "pool1" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 2 - } -} layers { name: "norm1" type: LRN - bottom: "pool1" - top: "norm1" lrn_param { local_size: 5 alpha: 0.0001 beta: 0.75 } + bottom: "conv1" + top: "norm1" +} +layers { + name: "pool1" + type: POOLING + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } + bottom: "norm1" + top: "pool1" } layers { name: "conv2" type: CONVOLUTION - bottom: "norm1" - top: "conv2" blobs_lr: 1 blobs_lr: 2 weight_decay: 1 @@ -70,15 +60,9 @@ layers { pad: 2 kernel_size: 5 group: 2 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 0.1 - } } + bottom: "pool1" + top: "conv2" } layers { name: "relu2" @@ -86,33 +70,31 @@ layers { bottom: "conv2" top: "conv2" } -layers { - name: "pool2" - type: POOLING - bottom: "conv2" - top: "pool2" - pooling_param { - pool: MAX - kernel_size: 3 - stride: 2 - } -} layers { name: "norm2" type: LRN - bottom: "pool2" - top: "norm2" lrn_param { local_size: 5 alpha: 0.0001 beta: 0.75 } + bottom: "conv2" + top: "norm2" +} +layers { + name: "pool2" + type: POOLING + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } + bottom: "norm2" + top: "pool2" } layers { name: "conv3" type: CONVOLUTION - bottom: "norm2" - top: "conv3" blobs_lr: 1 blobs_lr: 2 weight_decay: 1 @@ -121,15 +103,9 @@ layers { num_output: 384 pad: 1 kernel_size: 3 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 0.1 - } } + bottom: "pool2" + top: "conv3" } layers { name: "relu3" @@ -140,8 +116,6 @@ layers { layers { name: "conv4" type: CONVOLUTION - bottom: "conv3" - top: "conv4" blobs_lr: 1 blobs_lr: 2 weight_decay: 1 @@ -151,15 +125,9 @@ layers { pad: 1 kernel_size: 3 group: 2 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 0.1 - } } + bottom: "conv3" + top: "conv4" } layers { name: "relu4" @@ -170,8 +138,6 @@ layers { layers { name: "conv5" type: CONVOLUTION - bottom: "conv4" - top: "conv5" blobs_lr: 1 blobs_lr: 2 weight_decay: 1 @@ -181,15 +147,9 @@ layers { pad: 1 kernel_size: 3 group: 2 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 0.1 - } } + bottom: "conv4" + top: "conv5" } layers { name: "relu5" @@ -200,140 +160,86 @@ layers { layers { name: "pool5" type: POOLING - bottom: "conv5" - top: "pool5" pooling_param { pool: MAX kernel_size: 3 stride: 2 } + bottom: "conv5" + top: "pool5" } layers { - name: "fc6-conv" - type: CONVOLUTION - bottom: "pool5" - top: "fc6-conv" + name: "fc6" + type: INNER_PRODUCT blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 - convolution_param { + inner_product_param { num_output: 4096 - kernel_size: 6 - pad: 3 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 1 - } } + bottom: "pool5" + top: "fc6" } layers { name: "relu6" type: RELU - bottom: "fc6-conv" - top: "fc6-conv" + bottom: "fc6" + top: "fc6" } layers { name: "drop6" type: DROPOUT - bottom: "fc6-conv" - top: "fc6-conv" dropout_param { - dropout_ratio: 0.0 + dropout_ratio: 0.5 } + bottom: "fc6" + top: "fc6" } layers { - name: "fc7-conv" - type: CONVOLUTION - bottom: "fc6-conv" - top: "fc7-conv" + name: "fc7" + type: INNER_PRODUCT blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 - convolution_param { + inner_product_param { num_output: 4096 - kernel_size: 1 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 1 - } } + bottom: "fc6" + top: "fc7" } layers { name: "relu7" type: RELU - bottom: "fc7-conv" - top: "fc7-conv" + bottom: "fc7" + top: "fc7" } layers { name: "drop7" type: DROPOUT - bottom: "fc7-conv" - top: "fc7-conv" dropout_param { - dropout_ratio: 0.0 + dropout_ratio: 0.5 } + bottom: "fc7" + top: "fc7" } - layers { - name: "bb-output" - type: CONVOLUTION - bottom: "fc7-conv" - top: "bb-output" + name: "fc8" + type: INNER_PRODUCT blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 - convolution_param { - num_output: 64 - kernel_size: 1 - weight_filler { - type: "gaussian" - std: 0.01 - } - bias_filler { - type: "constant" - value: 1.0 - } - } -} - -layers { - name: "pixel-conv" - type: CONVOLUTION - bottom: "fc7-conv" - top: "pixel-conv" - blobs_lr: 1 - blobs_lr: 2 - weight_decay: 1 - weight_decay: 0 - convolution_param { - num_output: 16 - kernel_size: 1 - weight_filler { - type: "gaussian" - std: 0.005 - } - bias_filler { - type: "constant" - value: 1.0 - } + inner_product_param { + num_output: 1000 } + bottom: "fc7" + top: "fc8" } - -# Pixel level logistic prediction. layers { - name: "pixel-prob" - type: SIGMOID - bottom: "pixel-conv" - top: "pixel-prob" + name: "prob" + type: SOFTMAX + bottom: "fc8" + top: "prob" } diff --git a/models/brody/solver.prototxt b/models/brody/solver.prototxt index c1501649dbc..25793c049b7 100644 --- a/models/brody/solver.prototxt +++ b/models/brody/solver.prototxt @@ -1,14 +1,14 @@ net: "models/brody/train_val_brody.prototxt" test_iter: 1000 test_interval: 1000 -base_lr: 0.0000001 +base_lr: 0.00000001 lr_policy: "step" gamma: 0.1 stepsize: 100000 -display: 10 +display: 20 max_iter: 1450000 -momentum: 0.9 +momentum: 0.2 weight_decay: 0.00005 -snapshot: 10000 +snapshot: 2000 snapshot_prefix: "models/brody/caffe_brody_train" solver_mode: GPU diff --git a/models/brody/train_val_brody.prototxt b/models/brody/train_val_brody.prototxt index b7acd942f86..e98103aa5a7 100644 --- a/models/brody/train_val_brody.prototxt +++ b/models/brody/train_val_brody.prototxt @@ -3,11 +3,12 @@ name: "BrodyNet" # Training input. layers { name: "data" - type: VIDEO_DATA + type: DATA top: "data" - video_data_param { - source: "/scail/group/deeplearning/driving_data/twangcat/schedules/q50_multilane_planar_train_schedule1_batch20_2cam.txt" - batch_size: 20 + data_param { + source: "driving_img_train" + backend: LMDB + batch_size: 25 } transform_param { mean_file: "driving_img_mean.binaryproto" @@ -18,11 +19,12 @@ layers { # Bounding box label and pixel label. layers { name: "label" - type: MULTILANE_LABEL + type: DATA top: "label" - multilane_label_param { - source: "/scail/group/deeplearning/driving_data/twangcat/schedules/q50_multilane_planar_train_schedule1_batch20_2cam.txt" - batch_size: 20 + data_param { + source: "driving_label_train" + backend: LMDB + batch_size: 25 } include: { phase: TRAIN } } @@ -33,9 +35,9 @@ layers { type: DATA top: "data" data_param { - source: "/deep/group/driving_data/twangcat/lmdb/driving_img_test" + source: "driving_img_test" backend: LMDB - batch_size: 20 + batch_size: 25 } transform_param { mean_file: "driving_img_mean.binaryproto" @@ -49,9 +51,9 @@ layers { type: DATA top: "label" data_param { - source: "/deep/group/driving_data/twangcat/lmdb/driving_label_test" + source: "driving_label_test" backend: LMDB - batch_size: 20 + batch_size: 25 } include: { phase: TEST } } @@ -63,13 +65,9 @@ layers { bottom: "label" top: "pixel-label" top: "bb-label" - top: "height-label" - top: "norm-label" slice_param { slice_dim: 1 slice_point: 16 - slice_point: 80 - slice_point: 96 } } @@ -88,19 +86,6 @@ layers { } } -layers { - name: "height-block" - type: CONCAT - bottom: "height-label" - bottom: "height-label" - bottom: "height-label" - bottom: "height-label" - top: "height-block" - concat_param { - concat_dim: 1 - } -} - layers { name: "conv1" type: CONVOLUTION @@ -120,7 +105,7 @@ layers { } bias_filler { type: "constant" - value: 0.1 + value: 0 } } } @@ -165,14 +150,14 @@ layers { num_output: 256 pad: 2 kernel_size: 5 - group: 2 + group: 1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" - value: 0.1 + value: 1 } } } @@ -223,7 +208,7 @@ layers { } bias_filler { type: "constant" - value: 0.1 + value: 0 } } } @@ -246,14 +231,14 @@ layers { num_output: 384 pad: 1 kernel_size: 3 - group: 2 + group: 1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" - value: 0.1 + value: 1 } } } @@ -276,14 +261,14 @@ layers { num_output: 256 pad: 1 kernel_size: 3 - group: 2 + group: 1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" - value: 0.1 + value: 1 } } } @@ -319,7 +304,7 @@ layers { pad: 3 weight_filler { type: "gaussian" - std: 0.01 + std: 0.005 } bias_filler { type: "constant" @@ -339,7 +324,7 @@ layers { bottom: "fc6-conv" top: "fc6-conv" dropout_param { - dropout_ratio: 0.0 + dropout_ratio: 0.5 } } layers { @@ -356,7 +341,7 @@ layers { kernel_size: 1 weight_filler { type: "gaussian" - std: 0.01 + std: 0.005 } bias_filler { type: "constant" @@ -376,7 +361,7 @@ layers { bottom: "fc7-conv" top: "fc7-conv" dropout_param { - dropout_ratio: 0.0 + dropout_ratio: 0.5 } } @@ -385,16 +370,16 @@ layers { type: CONVOLUTION bottom: "fc7-conv" top: "bb-output" - blobs_lr: 100 - blobs_lr: 200 - weight_decay: 0.00001 + blobs_lr: 0.001 + blobs_lr: 2 + weight_decay: 1 weight_decay: 0 convolution_param { num_output: 64 kernel_size: 1 weight_filler { type: "gaussian" - std: 0.01 + std: 0.005 } bias_filler { type: "constant" @@ -456,63 +441,10 @@ layers { } # Squared loss on the bounding boxes. -#layers { -# name: "bb-loss" -# type: EUCLIDEAN_LOSS -# bottom: "bb-masked-output" -# bottom: "bb-label" -# top: "bb-loss" -# loss_weight: 0.01 -#} - -# L1 error loss layers { - name: "bb-diff" - type: ELTWISE + name: "bb-loss" + type: EUCLIDEAN_LOSS bottom: "bb-masked-output" bottom: "bb-label" - eltwise_param { - operation: SUM - coeff: 1.0 - coeff: -1.0 - } - top: "bb-diff" -} - -#layers { -# name: "bb-loss" -# type: ABSVAL -# bottom: "bb-diff" -# top: "bb-loss" -# # 1 / (20 * 15 * 64) -# loss_weight: 0.00000000001 -#} - -layers { - name: "bb-loss-pow2" - type: POWER - bottom: "bb-diff" - top: "bb-loss-pow2" - # 1 / (20 * 15 * 64) - power_param { - power: 2 - } -} - -layers { - name: "bb-loss-normalize" - type: ELTWISE - bottom: "bb-loss-pow2" - bottom: "height-block" - eltwise_param { - operation: PROD - } top: "bb-loss" - loss_weight: 0.001 } - -#layers { -# name: "bb-loss-silence" -# type: SILENCE -# bottom: "bb-loss" -#}