yolov3_mobilenet_v1_roadsign.yml 1.7 KB
Newer Older
F
Feng Ni 已提交
1 2 3 4 5 6 7 8 9 10
_BASE_: [
  '../datasets/roadsign_voc.yml',
  '../runtime.yml',
  '_base_/yolov3_mobilenet_v1.yml',
  '_base_/yolov3_reader.yml',
]
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/dygraph/yolov3_mobilenet_v1_270e_coco.pdparams
load_static_weights: false
norm_type: sync_bn
weights: output/yolov3_mobilenet_v1_roadsign/model_final
F
Feng Ni 已提交
11 12
metric: VOC
map_type: integral
F
Feng Ni 已提交
13 14 15 16 17 18 19 20 21

YOLOv3Loss:
  ignore_thresh: 0.7
  label_smooth: true

TrainReader:
  inputs_def:
    num_max_boxes: 50
  sample_transforms:
22 23 24 25 26 27
    - Decode: {}
    - Mixup: {alpha: 1.5, beta: 1.5}
    - RandomDistort: {}
    - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
    - RandomCrop: {}
    - RandomFlip: {}
F
Feng Ni 已提交
28
  batch_transforms:
29
    - BatchRandomResize:
F
Feng Ni 已提交
30 31 32 33
        target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608]
        random_size: True
        random_interp: True
        keep_ratio: False
34 35 36 37 38 39
    - NormalizeBox: {}
    - PadBox: {num_max_boxes: 50}
    - BboxXYXY2XYWH: {}
    - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
    - Permute: {}
    - Gt2YoloTarget:
F
Feng Ni 已提交
40 41 42 43 44 45 46 47
        anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]]
        anchors: [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]]
        downsample_ratios: [32, 16, 8]
        num_classes: 4
  batch_size: 8
  shuffle: true
  drop_last: true

F
Feng Ni 已提交
48
snapshot_epoch: 2
F
Feng Ni 已提交
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
epoch: 40

LearningRate:
  base_lr: 0.0001
  schedulers:
  - !PiecewiseDecay
    gamma: 0.1
    milestones: [32, 36]
  - !LinearWarmup
    start_factor: 0.3333333333333333
    steps: 100

OptimizerBuilder:
  optimizer:
    momentum: 0.9
    type: Momentum
  regularizer:
    factor: 0.0005
    type: L2