blazeface_nas.yml 3.0 KB
Newer Older
1 2
architecture: BlazeFace
max_iters: 320000
3
pretrain_weights:
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
use_gpu: true
snapshot_iter: 10000
log_smooth_window: 20
log_iter: 20
metric: WIDERFACE
save_dir: output
weights: output/blazeface_nas/model_final/
# 1(label_class) + 1(background)
num_classes: 2

BlazeFace:
  backbone: BlazeNet
  output_decoder:
    keep_top_k: 750
    nms_threshold: 0.3
    nms_top_k: 5000
    score_threshold: 0.01
  min_sizes: [[16.,24.], [32., 48., 64., 80., 96., 128.]]
  use_density_prior_box: false

BlazeNet:
  blaze_filters: [[12, 12], [12, 12, 2], [12, 12]]
  double_blaze_filters: [[12, 16, 24, 2], [24, 12, 24], [24, 16, 72, 2], [72, 12, 72]]
  with_extra_blocks: true
  lite_edition: false

LearningRate:
  base_lr: 0.001
  schedulers:
  - !PiecewiseDecay
    gamma: 0.1
    milestones: [240000, 300000]

OptimizerBuilder:
  optimizer:
    momentum: 0.0
    type: RMSPropOptimizer
  regularizer:
    factor: 0.0005
    type: L2

45 46 47 48
TrainReader:
  inputs_def:
    image_shape: [3, 640, 640]
    fields: ['image', 'gt_bbox', 'gt_class']
49
  dataset:
50
    !WIDERFaceDataSet
51
    dataset_dir: dataset/wider_face
52
    anno_path: wider_face_split/wider_face_train_bbx_gt.txt
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
    image_dir: WIDER_train/images
  sample_transforms:
  - !DecodeImage
    to_rgb: true
  - !NormalizeBox {}
  - !RandomDistort
    brightness_lower: 0.875
    brightness_upper: 1.125
    is_order: true
  - !ExpandImage
    max_ratio: 4
    prob: 0.5
  - !CropImageWithDataAchorSampling
    anchor_sampler:
    - [1, 10, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.2, 0.0]
    batch_sampler:
    - [1, 50, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
    - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
    - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
    - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
    - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
    target_size: 640
  - !RandomInterpImage
    target_size: 640
  - !RandomFlipImage
    is_normalized: true
  - !Permute {}
  - !NormalizeImage
    is_scale: false
    mean: [104, 117, 123]
    std: [127.502231, 127.502231, 127.502231]
84 85 86
  batch_size: 8
  use_process: true
  shuffle: true
87

88 89 90
EvalReader:
  inputs_def:
    fields: ['image', 'im_id']
91
  dataset:
92
    !WIDERFaceDataSet
93
    dataset_dir: dataset/wider_face
94
    anno_path: wider_face_split/wider_face_val_bbx_gt.txt
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
    image_dir: WIDER_val/images
  sample_transforms:
  - !DecodeImage
    to_rgb: true
  - !NormalizeBox {}
  - !ResizeImage
    interp: 1
    target_size: 640
    use_cv2: false
  - !Permute {}
  - !NormalizeImage
    is_scale: false
    mean: [104, 117, 123]
    std: [127.502231, 127.502231, 127.502231]
  batch_size: 1
110 111 112 113 114

TestReader:
  inputs_def:
    image_shape: [3,640,640]
    fields: ['image', 'im_id', 'im_shape']
115
  dataset:
116
    !ImageFolder
117 118 119 120 121 122 123 124 125 126 127 128 129
    use_default_label: true
  sample_transforms:
  - !DecodeImage
    to_rgb: true
  - !ResizeImage
    interp: 1
    target_size: 640
    use_cv2: false
  - !Permute {}
  - !NormalizeImage
    is_scale: false
    mean: [104, 117, 123]
    std: [127.502231, 127.502231, 127.502231]
130
  batch_size: 1