blazeface_nas.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. architecture: BlazeFace
  2. max_iters: 320000
  3. pretrain_weights:
  4. use_gpu: true
  5. snapshot_iter: 10000
  6. log_iter: 20
  7. metric: WIDERFACE
  8. save_dir: output
  9. weights: output/blazeface_nas/model_final
  10. # 1(label_class) + 1(background)
  11. num_classes: 2
  12. BlazeFace:
  13. backbone: BlazeNet
  14. output_decoder:
  15. keep_top_k: 750
  16. nms_threshold: 0.3
  17. nms_top_k: 5000
  18. score_threshold: 0.01
  19. min_sizes: [[16.,24.], [32., 48., 64., 80., 96., 128.]]
  20. use_density_prior_box: false
  21. BlazeNet:
  22. blaze_filters: [[12, 12], [12, 12, 2], [12, 12]]
  23. double_blaze_filters: [[12, 16, 24, 2], [24, 12, 24], [24, 16, 72, 2], [72, 12, 72]]
  24. with_extra_blocks: true
  25. lite_edition: false
  26. LearningRate:
  27. base_lr: 0.001
  28. schedulers:
  29. - !PiecewiseDecay
  30. gamma: 0.1
  31. milestones: [240000, 300000]
  32. OptimizerBuilder:
  33. optimizer:
  34. momentum: 0.0
  35. type: RMSPropOptimizer
  36. regularizer:
  37. factor: 0.0005
  38. type: L2
  39. TrainReader:
  40. inputs_def:
  41. image_shape: [3, 640, 640]
  42. fields: ['image', 'gt_bbox', 'gt_class']
  43. dataset:
  44. !WIDERFaceDataSet
  45. dataset_dir: dataset/wider_face
  46. anno_path: wider_face_split/wider_face_train_bbx_gt.txt
  47. image_dir: WIDER_train/images
  48. sample_transforms:
  49. - !DecodeImage
  50. to_rgb: true
  51. - !NormalizeBox {}
  52. - !RandomDistort
  53. brightness_lower: 0.875
  54. brightness_upper: 1.125
  55. is_order: true
  56. - !ExpandImage
  57. max_ratio: 4
  58. prob: 0.5
  59. - !CropImageWithDataAchorSampling
  60. anchor_sampler:
  61. - [1, 10, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.2, 0.0]
  62. batch_sampler:
  63. - [1, 50, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  64. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  65. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  66. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  67. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  68. target_size: 640
  69. - !RandomInterpImage
  70. target_size: 640
  71. - !RandomFlipImage
  72. is_normalized: true
  73. - !Permute {}
  74. - !NormalizeImage
  75. is_scale: false
  76. mean: [104, 117, 123]
  77. std: [127.502231, 127.502231, 127.502231]
  78. batch_size: 8
  79. use_process: true
  80. worker_num: 8
  81. shuffle: true
  82. EvalReader:
  83. inputs_def:
  84. fields: ['image', 'im_id']
  85. dataset:
  86. !WIDERFaceDataSet
  87. dataset_dir: dataset/wider_face
  88. anno_path: wider_face_split/wider_face_val_bbx_gt.txt
  89. image_dir: WIDER_val/images
  90. sample_transforms:
  91. - !DecodeImage
  92. to_rgb: true
  93. - !NormalizeBox {}
  94. - !NormalizeImage
  95. is_channel_first: false
  96. is_scale: false
  97. mean: [123, 117, 104]
  98. std: [127.502231, 127.502231, 127.502231]
  99. - !Permute {}
  100. batch_size: 1
  101. TestReader:
  102. inputs_def:
  103. fields: ['image', 'im_id', 'im_shape']
  104. dataset:
  105. !ImageFolder
  106. use_default_label: true
  107. sample_transforms:
  108. - !DecodeImage
  109. to_rgb: true
  110. - !NormalizeImage
  111. is_channel_first: false
  112. is_scale: false
  113. mean: [123, 117, 104]
  114. std: [127.502231, 127.502231, 127.502231]
  115. - !Permute {}
  116. batch_size: 1