faceboxes_lite.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. architecture: FaceBoxes
  2. pretrain_weights:
  3. use_gpu: true
  4. max_iters: 320000
  5. snapshot_iter: 10000
  6. log_iter: 20
  7. metric: WIDERFACE
  8. save_dir: output
  9. weights: output/faceboxes_lite/model_final
  10. # 1(label_class) + 1(background)
  11. num_classes: 2
  12. FaceBoxes:
  13. backbone: FaceBoxNet
  14. densities: [[2, 1, 1], [1, 1]]
  15. fixed_sizes: [[16., 32., 64.], [96., 128.]]
  16. output_decoder:
  17. keep_top_k: 750
  18. nms_threshold: 0.3
  19. nms_top_k: 5000
  20. score_threshold: 0.01
  21. FaceBoxNet:
  22. with_extra_blocks: true
  23. lite_edition: true
  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. batch_size: 8
  39. use_process: True
  40. worker_num: 8
  41. shuffle: true
  42. inputs_def:
  43. image_shape: [3, 640, 640]
  44. fields: ['image', 'gt_bbox', 'gt_class']
  45. dataset:
  46. !WIDERFaceDataSet
  47. dataset_dir: dataset/wider_face
  48. anno_path: wider_face_split/wider_face_train_bbx_gt.txt
  49. image_dir: WIDER_train/images
  50. sample_transforms:
  51. - !DecodeImage
  52. to_rgb: true
  53. - !NormalizeBox {}
  54. - !RandomDistort
  55. brightness_lower: 0.875
  56. brightness_upper: 1.125
  57. is_order: true
  58. - !ExpandImage
  59. max_ratio: 4
  60. prob: 0.5
  61. - !CropImageWithDataAchorSampling
  62. anchor_sampler:
  63. - [1, 10, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.2, 0.0]
  64. batch_sampler:
  65. - [1, 50, 1.0, 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. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  69. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  70. target_size: 640
  71. - !RandomInterpImage
  72. target_size: 640
  73. - !RandomFlipImage
  74. is_normalized: true
  75. - !Permute {}
  76. - !NormalizeImage
  77. is_scale: false
  78. mean: [104, 117, 123]
  79. std: [127.502231, 127.502231, 127.502231]
  80. EvalReader:
  81. batch_size: 1
  82. use_process: false
  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. TestReader:
  101. inputs_def:
  102. fields: ['image', 'im_id', 'im_shape']
  103. dataset:
  104. !ImageFolder
  105. use_default_label: true
  106. sample_transforms:
  107. - !DecodeImage
  108. to_rgb: true
  109. - !NormalizeImage
  110. is_channel_first: false
  111. is_scale: false
  112. mean: [123, 117, 104]
  113. std: [127.502231, 127.502231, 127.502231]
  114. - !Permute {}
  115. batch_size: 1