和ZF差不多,基本一样。不同的地方主要是网络模型的修改和训练结束后的修改。
1-6参考Faster-RCNN+ZF用自己的数据集训练模型
input: "bbox_targets" input_dim: 1 # to be changed on-the-fly to match num ROIs input_dim: 20 # 4*(类别数+1) (=21) input_dim: 1 input_dim: 1
input: "bbox_loss_weights" input_dim: 1 # to be changed on-the-fly to match num ROIs input_dim: 20 # 4*(类别数+1) input_dim: 1 input_dim: 1
layer { bottom: "fc7" top: "cls_score" name: "cls_score" param { lr_mult: 1.0 } param { lr_mult: 2.0 } type: "InnerProduct" inner_product_param { num_output: 5 #类别数+1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } }
layer { bottom: "fc7" top: "bbox_pred" name: "bbox_pred" type: "InnerProduct" param { lr_mult: 1.0 } param { lr_mult: 2.0 } inner_product_param { num_output: 20 #4*(类别数+1) weight_filler { type: "gaussian" std: 0.001 } bias_filler { type: "constant" value: 0 } } }
layer { bottom: "fc7" top: "cls_score" name: "cls_score" param { lr_mult: 1.0 } param { lr_mult: 2.0 } type: "InnerProduct" inner_product_param { num_output: 5 #类别数+1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } }
layer { bottom: "fc7" top: "bbox_pred" name: "bbox_pred" type: "InnerProduct" param { lr_mult: 1.0 } param { lr_mult: 2.0 } inner_product_param { num_output: 20 #4*(类别数+1) weight_filler { type: "gaussian" std: 0.001 } bias_filler { type: "constant" value: 0 } } }
input: "bbox_targets" input_dim: 1 # to be changed on-the-fly to match num ROIs input_dim: 20 # 4*(类别数+1) input_dim: 1 input_dim: 1
input: "bbox_loss_weights" input_dim: 1 # to be changed on-the-fly to match num ROIs input_dim: 20 # 4* (类别数+1) input_dim: 1 input_dim: 1
layer { bottom: "fc7" top: "cls_score" name: "cls_score" param { lr_mult: 1.0 } param { lr_mult: 2.0 } type: "InnerProduct" inner_product_param { num_output: 5 #类别数+1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } }
layer { bottom: "fc7" top: "bbox_pred" name: "bbox_pred" type: "InnerProduct" param { lr_mult: 1.0 } param { lr_mult: 2.0 } inner_product_param { num_output: 20 #4*(类别数+1) weight_filler { type: "gaussian" std: 0.001 } bias_filler { type: "constant" value: 0 } } }
layer { bottom: "fc7" top: "cls_score" name: "cls_score" param { lr_mult: 1.0 } param { lr_mult: 2.0 } type: "InnerProduct" inner_product_param { num_output:5 #类别数+1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } }
layer { bottom: "fc7" top: "bbox_pred" name: "bbox_pred" type: "InnerProduct" param { lr_mult: 1.0 } param { lr_mult: 2.0 } inner_product_param { num_output: 20 #4*(类别数+1) weight_filler { type: "gaussian" std: 0.001 } bias_filler { type: "constant" value: 0 } } }
experiments\script_faster_rcnn_VOC2007_VGG16.m
input: "data" input_dim: 1 input_dim: 512 input_dim: 50 input_dim: 50
layer { bottom: "data" bottom: "rois" top: "pool5" name: "roi_pool5" type: "ROIPooling" roi_pooling_param { pooled_w: 7 pooled_h: 7 spatial_scale: 0.0625 # (1/16) } }