PP-YOLOE_plus-X.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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: 80
  17. worker_num: 4
  18. eval_height: &eval_height 640
  19. eval_width: &eval_width 640
  20. eval_size: &eval_size [*eval_height, *eval_width]
  21. TrainDataset:
  22. name: COCODetDataset
  23. image_dir: images
  24. anno_path: annotations/instance_train.json
  25. dataset_dir: datasets/COCO
  26. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  27. EvalDataset:
  28. name: COCODetDataset
  29. image_dir: images
  30. anno_path: annotations/instance_val.json
  31. dataset_dir: datasets/COCO
  32. allow_empty: true
  33. TestDataset:
  34. name: ImageFolder
  35. anno_path: annotations/instance_val.json
  36. dataset_dir: datasets/COCO
  37. TrainReader:
  38. sample_transforms:
  39. - Decode: {}
  40. - RandomDistort: {}
  41. - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
  42. - RandomCrop: {}
  43. - RandomFlip: {}
  44. batch_transforms:
  45. - 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}
  46. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  47. - Permute: {}
  48. - PadGT: {}
  49. batch_size: 8
  50. shuffle: true
  51. drop_last: true
  52. use_shared_memory: true
  53. collate_batch: true
  54. EvalReader:
  55. sample_transforms:
  56. - Decode: {}
  57. - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2}
  58. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  59. - Permute: {}
  60. batch_size: 2
  61. TestReader:
  62. inputs_def:
  63. image_shape: [3, *eval_height, *eval_width]
  64. sample_transforms:
  65. - Decode: {}
  66. - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2}
  67. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  68. - Permute: {}
  69. batch_size: 1
  70. # Model
  71. architecture: YOLOv3
  72. pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_x_obj365_pretrained.pdparams
  73. norm_type: sync_bn
  74. ema_decay: 0.9998
  75. ema_black_list: ['proj_conv.weight']
  76. custom_black_list: ['reduce_mean']
  77. depth_mult: 1.33
  78. width_mult: 1.25
  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. use_alpha: True
  90. CustomCSPPAN:
  91. out_channels: [768, 384, 192]
  92. stage_num: 1
  93. block_num: 3
  94. act: 'swish'
  95. spp: true
  96. PPYOLOEHead:
  97. fpn_strides: [32, 16, 8]
  98. grid_cell_scale: 5.0
  99. grid_cell_offset: 0.5
  100. static_assigner_epoch: 30
  101. use_varifocal_loss: true
  102. loss_weight: {class: 1.0, iou: 2.5, dfl: 0.5}
  103. static_assigner:
  104. name: ATSSAssigner
  105. topk: 9
  106. assigner:
  107. name: TaskAlignedAssigner
  108. topk: 13
  109. alpha: 1.0
  110. beta: 6.0
  111. nms:
  112. name: MultiClassNMS
  113. nms_top_k: 1000
  114. keep_top_k: 300
  115. score_threshold: 0.01
  116. nms_threshold: 0.7
  117. # Optimizer
  118. LearningRate:
  119. base_lr: 0.0001
  120. schedulers:
  121. - name: CosineDecay
  122. max_epochs: 96
  123. - name: LinearWarmup
  124. start_factor: 0.
  125. steps: 100
  126. OptimizerBuilder:
  127. optimizer:
  128. momentum: 0.9
  129. type: Momentum
  130. regularizer:
  131. factor: 0.0005
  132. type: L2
  133. # Export
  134. export:
  135. post_process: true
  136. nms: true
  137. benchmark: false
  138. fuse_conv_bn: false