blazeface.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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/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. with_extra_blocks: true
  23. lite_edition: false
  24. LearningRate:
  25. base_lr: 0.001
  26. schedulers:
  27. - !PiecewiseDecay
  28. gamma: 0.1
  29. milestones: [240000, 300000]
  30. OptimizerBuilder:
  31. optimizer:
  32. momentum: 0.0
  33. type: RMSPropOptimizer
  34. regularizer:
  35. factor: 0.0005
  36. type: L2
  37. TrainReader:
  38. inputs_def:
  39. image_shape: [3, 640, 640]
  40. fields: ['image', 'gt_bbox', 'gt_class']
  41. dataset:
  42. !WIDERFaceDataSet
  43. dataset_dir: dataset/wider_face
  44. anno_path: wider_face_split/wider_face_train_bbx_gt.txt
  45. image_dir: WIDER_train/images
  46. sample_transforms:
  47. - !DecodeImage
  48. to_rgb: true
  49. - !NormalizeBox {}
  50. - !RandomDistort
  51. brightness_lower: 0.875
  52. brightness_upper: 1.125
  53. is_order: true
  54. - !ExpandImage
  55. max_ratio: 4
  56. prob: 0.5
  57. - !CropImageWithDataAchorSampling
  58. anchor_sampler:
  59. - [1, 10, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.2, 0.0]
  60. batch_sampler:
  61. - [1, 50, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  62. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  63. - [1, 50, 0.3, 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. target_size: 640
  67. - !RandomInterpImage
  68. target_size: 640
  69. - !RandomFlipImage
  70. is_normalized: true
  71. - !Permute {}
  72. - !NormalizeImage
  73. is_scale: false
  74. mean: [104, 117, 123]
  75. std: [127.502231, 127.502231, 127.502231]
  76. batch_size: 8
  77. use_process: true
  78. worker_num: 8
  79. shuffle: true
  80. EvalReader:
  81. inputs_def:
  82. fields: ['image', 'im_id']
  83. dataset:
  84. !WIDERFaceDataSet
  85. dataset_dir: dataset/wider_face
  86. anno_path: wider_face_split/wider_face_val_bbx_gt.txt
  87. image_dir: WIDER_val/images
  88. sample_transforms:
  89. - !DecodeImage
  90. to_rgb: true
  91. - !NormalizeBox {}
  92. - !NormalizeImage
  93. is_channel_first: false
  94. is_scale: false
  95. mean: [123, 117, 104]
  96. std: [127.502231, 127.502231, 127.502231]
  97. - !Permute {}
  98. batch_size: 1
  99. TestReader:
  100. inputs_def:
  101. fields: ['image', 'im_id', 'im_shape']
  102. dataset:
  103. !ImageFolder
  104. use_default_label: true
  105. sample_transforms:
  106. - !DecodeImage
  107. to_rgb: true
  108. - !NormalizeImage
  109. is_channel_first: false
  110. is_scale: false
  111. mean: [123, 117, 104]
  112. std: [127.502231, 127.502231, 127.502231]
  113. - !Permute {}
  114. batch_size: 1