PP-YOLOE-S_human.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # Runtime
  2. use_gpu: true
  3. use_xpu: false
  4. use_mlu: false
  5. use_npu: false
  6. save_dir: output
  7. print_flops: false
  8. print_params: false
  9. use_ema: true
  10. log_iter: 100
  11. snapshot_epoch: 4
  12. # Dataset
  13. metric: COCO
  14. num_classes: 1
  15. TrainDataset:
  16. name: COCODataSet
  17. image_dir: ""
  18. anno_path: annotations/train.json
  19. dataset_dir: dataset/crowdhuman
  20. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  21. EvalDataset:
  22. name: COCODataSet
  23. image_dir: ""
  24. anno_path: annotations/val.json
  25. dataset_dir: dataset/crowdhuman
  26. allow_empty: true
  27. TestDataset:
  28. name: ImageFolder
  29. anno_path: annotations/val.json
  30. dataset_dir: dataset/crowdhuman
  31. #reader
  32. worker_num: 4
  33. eval_height: &eval_height 640
  34. eval_width: &eval_width 640
  35. eval_size: &eval_size [*eval_height, *eval_width]
  36. TrainReader:
  37. sample_transforms:
  38. - Decode: {}
  39. - RandomDistort: {}
  40. - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
  41. - RandomCrop: {}
  42. - RandomFlip: {}
  43. batch_transforms:
  44. - 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}
  45. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  46. - Permute: {}
  47. - PadGT: {}
  48. batch_size: 8
  49. shuffle: true
  50. drop_last: true
  51. use_shared_memory: true
  52. collate_batch: true
  53. EvalReader:
  54. sample_transforms:
  55. - Decode: {}
  56. - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2}
  57. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  58. - Permute: {}
  59. batch_size: 2
  60. TestReader:
  61. inputs_def:
  62. image_shape: [3, *eval_height, *eval_width]
  63. sample_transforms:
  64. - Decode: {}
  65. - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2}
  66. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  67. - Permute: {}
  68. batch_size: 1
  69. # Model
  70. pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_crn_s_300e_coco.pdparams
  71. depth_mult: 0.33
  72. width_mult: 0.50
  73. architecture: YOLOv3
  74. norm_type: sync_bn
  75. use_ema: true
  76. ema_decay: 0.9998
  77. ema_black_list: ['proj_conv.weight']
  78. custom_black_list: ['reduce_mean']
  79. YOLOv3:
  80. backbone: CSPResNet
  81. neck: CustomCSPPAN
  82. yolo_head: PPYOLOEHead
  83. post_process: ~
  84. CSPResNet:
  85. layers: [3, 6, 6, 3]
  86. channels: [64, 128, 256, 512, 1024]
  87. return_idx: [1, 2, 3]
  88. use_large_stem: True
  89. CustomCSPPAN:
  90. out_channels: [768, 384, 192]
  91. stage_num: 1
  92. block_num: 3
  93. act: 'swish'
  94. spp: true
  95. PPYOLOEHead:
  96. fpn_strides: [32, 16, 8]
  97. grid_cell_scale: 5.0
  98. grid_cell_offset: 0.5
  99. static_assigner_epoch: -1
  100. use_varifocal_loss: True
  101. loss_weight: {class: 1.0, iou: 2.5, dfl: 0.5}
  102. static_assigner:
  103. name: ATSSAssigner
  104. topk: 9
  105. assigner:
  106. name: TaskAlignedAssigner
  107. topk: 13
  108. alpha: 1.0
  109. beta: 6.0
  110. nms:
  111. name: MultiClassNMS
  112. nms_top_k: 1000
  113. keep_top_k: 100
  114. score_threshold: 0.01
  115. nms_threshold: 0.6
  116. # Optimizer
  117. epoch: 36
  118. LearningRate:
  119. base_lr: 0.001
  120. schedulers:
  121. - name: CosineDecay
  122. max_epochs: 43
  123. - name: LinearWarmup
  124. start_factor: 0.
  125. epochs: 1
  126. OptimizerBuilder:
  127. optimizer:
  128. momentum: 0.9
  129. type: Momentum
  130. regularizer:
  131. factor: 0.0005
  132. type: L2
  133. # Exporting the model
  134. export:
  135. post_process: True # Whether post-processing is included in the network when export model.
  136. nms: True # Whether NMS is included in the network when export model.
  137. benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  138. fuse_conv_bn: False