blazeface_keypoint.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. architecture: BlazeFace
  2. max_iters: 160000
  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_keypoint/model_final.pdparams
  10. # 1(label_class) + 1(background)
  11. num_classes: 2
  12. with_lmk: true
  13. BlazeFace:
  14. backbone: BlazeNet
  15. output_decoder:
  16. keep_top_k: 750
  17. nms_threshold: 0.3
  18. nms_top_k: 5000
  19. score_threshold: 0.01
  20. min_sizes: [[16.,24.], [32., 48., 64., 80., 96., 128.]]
  21. use_density_prior_box: false
  22. lmk_loss:
  23. overlap_threshold: 0.35
  24. neg_overlap: 0.35
  25. BlazeNet:
  26. with_extra_blocks: true
  27. lite_edition: false
  28. LearningRate:
  29. base_lr: 0.002
  30. schedulers:
  31. - !PiecewiseDecay
  32. gamma: 0.1
  33. milestones: [120000, 150000]
  34. OptimizerBuilder:
  35. optimizer:
  36. momentum: 0.9
  37. type: Momentum
  38. regularizer:
  39. factor: 0.0005
  40. type: L2
  41. TrainReader:
  42. inputs_def:
  43. image_shape: [3, 640, 640]
  44. fields: ['image', 'gt_bbox', 'gt_class', 'gt_keypoint', 'keypoint_ignore']
  45. dataset:
  46. !WIDERFaceDataSet
  47. dataset_dir: dataset/wider_face
  48. anno_path: wider_face_split/wider_face_train_bbx_lmk_gt.txt
  49. image_dir: WIDER_train/images
  50. with_lmk: true
  51. sample_transforms:
  52. - !DecodeImage
  53. to_rgb: true
  54. - !NormalizeBox {}
  55. - !RandomDistort
  56. brightness_lower: 0.875
  57. brightness_upper: 1.125
  58. is_order: true
  59. - !ExpandImage
  60. max_ratio: 4
  61. prob: 0.5
  62. - !CropImageWithDataAchorSampling
  63. anchor_sampler:
  64. - [1, 10, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.2, 0.0]
  65. batch_sampler:
  66. - [1, 50, 1.0, 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. - [1, 50, 0.3, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0]
  71. target_size: 640
  72. - !ResizeImage
  73. target_size: 640
  74. interp: 1
  75. - !RandomInterpImage
  76. target_size: 640
  77. - !RandomFlipImage
  78. is_normalized: true
  79. - !Permute {}
  80. - !NormalizeImage
  81. is_scale: false
  82. mean: [104, 117, 123]
  83. std: [127.502231, 127.502231, 127.502231]
  84. batch_size: 16
  85. use_process: true
  86. worker_num: 8
  87. shuffle: true
  88. EvalReader:
  89. inputs_def:
  90. 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. image_dir: WIDER_val/images
  96. sample_transforms:
  97. - !DecodeImage
  98. to_rgb: true
  99. - !NormalizeBox {}
  100. - !Permute {}
  101. - !NormalizeImage
  102. is_scale: false
  103. mean: [104, 117, 123]
  104. std: [127.502231, 127.502231, 127.502231]
  105. batch_size: 1
  106. TestReader:
  107. inputs_def:
  108. fields: ['image', 'im_id', 'im_shape']
  109. dataset:
  110. !ImageFolder
  111. use_default_label: true
  112. sample_transforms:
  113. - !DecodeImage
  114. to_rgb: true
  115. - !ResizeImage
  116. target_size: 640
  117. interp: 1
  118. - !Permute {}
  119. - !NormalizeImage
  120. is_scale: false
  121. mean: [104, 117, 123]
  122. std: [127.502231, 127.502231, 127.502231]
  123. batch_size: 1