PP-YOLOE-R-L.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. use_gpu: true
  2. use_xpu: false
  3. use_mlu: false
  4. use_npu: false
  5. log_iter: 20
  6. save_dir: output
  7. snapshot_epoch: 1
  8. print_flops: false
  9. print_params: false
  10. # Exporting the model
  11. export:
  12. post_process: True # Whether post-processing is included in the network when export model.
  13. nms: True # Whether NMS is included in the network when export model.
  14. benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  15. fuse_conv_bn: False
  16. log_iter: 10
  17. snapshot_epoch: 3
  18. weights: output/ppyoloe_r_crn_l_3x_dota/model_final
  19. pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_l_pretrained.pdparams
  20. depth_mult: 1.0
  21. width_mult: 1.0
  22. ##### Data
  23. metric: RBOX
  24. num_classes: 15
  25. TrainDataset:
  26. name: COCODataSet
  27. image_dir: images
  28. anno_path: annotations/instance_train.json
  29. dataset_dir: /root/data/DOTA/DOTA-sampled200_crop1024_data
  30. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd', 'gt_poly']
  31. EvalDataset:
  32. name: COCODataSet
  33. image_dir: images
  34. anno_path: annotations/instance_val.json
  35. dataset_dir: /root/data/DOTA/DOTA-sampled200_crop1024_data
  36. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd', 'gt_poly']
  37. TestDataset:
  38. name: ImageFolder
  39. anno_path: annotations/instance_val.json
  40. dataset_dir: /root/data/DOTA/DOTA-sampled200_crop1024_data
  41. worker_num: 4
  42. image_height: &image_height 1024
  43. image_width: &image_width 1024
  44. image_size: &image_size [*image_height, *image_width]
  45. TrainReader:
  46. sample_transforms:
  47. - Decode: {}
  48. - Poly2Array: {}
  49. - RandomRFlip: {}
  50. - RandomRRotate: {angle_mode: 'value', angle: [0, 90, 180, -90]}
  51. - RandomRRotate: {angle_mode: 'value', angle: [30, 60], rotate_prob: 0.5}
  52. - RResize: {target_size: *image_size, keep_ratio: True, interp: 2}
  53. - Poly2RBox: {filter_threshold: 2, filter_mode: 'edge', rbox_type: 'oc'}
  54. batch_transforms:
  55. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  56. - Permute: {}
  57. - PadRGT: {}
  58. - PadBatch: {pad_to_stride: 32}
  59. batch_size: 4
  60. shuffle: true
  61. drop_last: true
  62. use_shared_memory: true
  63. collate_batch: true
  64. EvalReader:
  65. sample_transforms:
  66. - Decode: {}
  67. - Poly2Array: {}
  68. - RResize: {target_size: *image_size, keep_ratio: True, interp: 2}
  69. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  70. - Permute: {}
  71. batch_transforms:
  72. - PadBatch: {pad_to_stride: 32}
  73. batch_size: 6
  74. collate_batch: false
  75. TestReader:
  76. sample_transforms:
  77. - Decode: {}
  78. - Resize: {target_size: *image_size, keep_ratio: True, interp: 2}
  79. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  80. - Permute: {}
  81. batch_transforms:
  82. - PadBatch: {pad_to_stride: 32}
  83. batch_size: 2
  84. ##### Model
  85. architecture: YOLOv3
  86. norm_type: sync_bn
  87. use_ema: true
  88. ema_decay: 0.9998
  89. YOLOv3:
  90. backbone: CSPResNet
  91. neck: CustomCSPPAN
  92. yolo_head: PPYOLOERHead
  93. post_process: ~
  94. CSPResNet:
  95. layers: [3, 6, 6, 3]
  96. channels: [64, 128, 256, 512, 1024]
  97. return_idx: [1, 2, 3]
  98. use_large_stem: True
  99. use_alpha: True
  100. CustomCSPPAN:
  101. out_channels: [768, 384, 192]
  102. stage_num: 1
  103. block_num: 3
  104. act: 'swish'
  105. spp: true
  106. use_alpha: True
  107. PPYOLOERHead:
  108. fpn_strides: [32, 16, 8]
  109. grid_cell_offset: 0.5
  110. use_varifocal_loss: true
  111. static_assigner_epoch: -1
  112. loss_weight: {class: 1.0, iou: 2.5, dfl: 0.05}
  113. static_assigner:
  114. name: FCOSRAssigner
  115. factor: 12
  116. threshold: 0.23
  117. boundary: [[512, 10000], [256, 512], [-1, 256]]
  118. assigner:
  119. name: RotatedTaskAlignedAssigner
  120. topk: 13
  121. alpha: 1.0
  122. beta: 6.0
  123. nms:
  124. name: MultiClassNMS
  125. nms_top_k: 2000
  126. keep_top_k: -1
  127. score_threshold: 0.1
  128. nms_threshold: 0.1
  129. normalized: False
  130. ##### Optimizer
  131. epoch: 36
  132. LearningRate:
  133. base_lr: 0.064
  134. schedulers:
  135. - !CosineDecay
  136. max_epochs: 44
  137. - !LinearWarmup
  138. start_factor: 0.
  139. steps: 1000
  140. OptimizerBuilder:
  141. clip_grad_by_norm: 35.
  142. optimizer:
  143. momentum: 0.9
  144. type: Momentum
  145. regularizer:
  146. factor: 0.0005
  147. type: L2