PP-YOLOE_plus-S_face.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. # Runtime
  2. epoch: 10
  3. log_iter: 10
  4. find_unused_parameters: false
  5. use_gpu: true
  6. use_xpu: false
  7. use_mlu: false
  8. use_npu: false
  9. use_ema: True
  10. save_dir: output
  11. snapshot_epoch: 1
  12. print_flops: false
  13. print_params: false
  14. # Dataset
  15. metric: COCO
  16. num_classes: 1
  17. worker_num: 4
  18. TrainDataset:
  19. name: COCODataSet
  20. image_dir: WIDER_train/images
  21. anno_path: train.json
  22. dataset_dir: data_face
  23. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  24. EvalDataset:
  25. name: COCODataSet
  26. image_dir: WIDER_val/images
  27. anno_path: val.json
  28. dataset_dir: data_face
  29. allow_empty: true
  30. TestDataset:
  31. name: COCODataSet
  32. image_dir: WIDER_val/images
  33. anno_path: val.json
  34. dataset_dir: data_face
  35. TrainReader:
  36. sample_transforms:
  37. - Decode: {}
  38. - RandomDistort: {}
  39. - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
  40. - RandomCrop: {}
  41. - RandomFlip: {}
  42. batch_transforms:
  43. - BatchRandomResize: {target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736, 768], random_size: True, random_interp: True, keep_ratio: False}
  44. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  45. - Permute: {}
  46. - PadGT: {}
  47. batch_size: 8
  48. shuffle: true
  49. drop_last: true
  50. use_shared_memory: true
  51. collate_batch: true
  52. EvalReader:
  53. sample_transforms:
  54. - Decode: {}
  55. - Resize: {target_size: [1088, 1088], keep_ratio: False, interp: 2}
  56. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  57. - Permute: {}
  58. batch_size: 2
  59. TestReader:
  60. sample_transforms:
  61. - Decode: {}
  62. - Resize: {target_size: [1088, 1088], keep_ratio: False, interp: 2}
  63. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  64. - Permute: {}
  65. batch_size: 1
  66. # Model
  67. architecture: YOLOv3
  68. pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_s_obj365_pretrained.pdparams
  69. norm_type: sync_bn
  70. ema_decay: 0.9998
  71. ema_black_list: ['proj_conv.weight']
  72. custom_black_list: ['reduce_mean']
  73. depth_mult: 0.33
  74. width_mult: 0.50
  75. YOLOv3:
  76. backbone: CSPResNet
  77. neck: CustomCSPPAN
  78. yolo_head: PPYOLOEHead
  79. post_process: ~
  80. CSPResNet:
  81. layers: [3, 6, 6, 3]
  82. channels: [64, 128, 256, 512, 1024]
  83. return_idx: [1, 2, 3]
  84. use_large_stem: true
  85. use_alpha: True
  86. CustomCSPPAN:
  87. out_channels: [768, 384, 192]
  88. stage_num: 1
  89. block_num: 3
  90. act: 'swish'
  91. spp: true
  92. PPYOLOEHead:
  93. fpn_strides: [32, 16, 8]
  94. grid_cell_scale: 5.0
  95. grid_cell_offset: 0.5
  96. static_assigner_epoch: 30
  97. use_varifocal_loss: true
  98. loss_weight: {class: 1.0, iou: 2.5, dfl: 0.5}
  99. static_assigner:
  100. name: ATSSAssigner
  101. topk: 9
  102. assigner:
  103. name: TaskAlignedAssigner
  104. topk: 13
  105. alpha: 1.0
  106. beta: 6.0
  107. nms:
  108. name: MultiClassNMS
  109. nms_top_k: 1000
  110. keep_top_k: 300
  111. score_threshold: 0.01
  112. nms_threshold: 0.7
  113. # Optimizer
  114. LearningRate:
  115. base_lr: 0.0001
  116. schedulers:
  117. - name: CosineDecay
  118. max_epochs: 300
  119. - name: LinearWarmup
  120. start_factor: 0.
  121. steps: 100
  122. OptimizerBuilder:
  123. optimizer:
  124. momentum: 0.9
  125. type: Momentum
  126. regularizer:
  127. factor: 0.0005
  128. type: L2
  129. # Export
  130. export:
  131. post_process: true
  132. nms: true
  133. benchmark: false
  134. fuse_conv_bn: false