ppyoloe_plus_crn_x_80e_sku110k.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. _BASE_: [
  2. './_base_/sku110k.yml',
  3. '../../runtime.yml'
  4. ]
  5. log_iter: 10
  6. snapshot_epoch: 20
  7. weights: output/ppyoloe_plus_crn_s_80e_coco/model_final
  8. pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_x_obj365_pretrained.pdparams
  9. depth_mult: 1.33
  10. width_mult: 1.25
  11. # arch
  12. architecture: YOLOv3
  13. norm_type: sync_bn
  14. use_ema: true
  15. ema_decay: 0.9998
  16. custom_black_list: ['reduce_mean']
  17. YOLOv3:
  18. backbone: CSPResNet
  19. neck: CustomCSPPAN
  20. yolo_head: PPYOLOEHead
  21. post_process: ~
  22. CSPResNet:
  23. layers: [3, 6, 6, 3]
  24. channels: [64, 128, 256, 512, 1024]
  25. return_idx: [1, 2, 3]
  26. use_large_stem: True
  27. use_alpha: True
  28. CustomCSPPAN:
  29. out_channels: [768, 384, 192]
  30. stage_num: 1
  31. block_num: 3
  32. act: 'swish'
  33. spp: true
  34. use_alpha: True
  35. PPYOLOEHead:
  36. fpn_strides: [32, 16, 8]
  37. grid_cell_scale: 5.0
  38. grid_cell_offset: 0.5
  39. static_assigner_epoch: -1
  40. use_varifocal_loss: True
  41. loss_weight: {class: 1.0, iou: 2.5, dfl: 0.5}
  42. static_assigner:
  43. name: ATSSAssigner
  44. topk: 9
  45. assigner:
  46. name: TaskAlignedAssigner
  47. topk: 13
  48. alpha: 1.0
  49. beta: 6.0
  50. nms:
  51. name: MultiClassNMS
  52. nms_top_k: 3000
  53. keep_top_k: 1000
  54. score_threshold: 0.01
  55. nms_threshold: 0.7
  56. # reader
  57. worker_num: 8
  58. eval_height: &eval_height 960
  59. eval_width: &eval_width 960
  60. eval_size: &eval_size [*eval_height, *eval_width]
  61. TrainReader:
  62. sample_transforms:
  63. - Decode: {}
  64. - Resize: {target_size: [3000, 1800], keep_ratio: True, interp: 2}
  65. - RandomDistort: {}
  66. - RandomCrop: {}
  67. - RandomFlip: {}
  68. batch_transforms:
  69. - BatchRandomResize: {target_size: [480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800, 832, 864, 896, 928, 960, 992, 1024, 1056, 1088, 1120, 1152], random_size: True, random_interp: True, keep_ratio: False}
  70. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  71. - Permute: {}
  72. - PadGT: {}
  73. batch_size: 4
  74. shuffle: true
  75. drop_last: true
  76. use_shared_memory: true
  77. collate_batch: true
  78. EvalReader:
  79. sample_transforms:
  80. - Decode: {}
  81. - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2}
  82. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  83. - Permute: {}
  84. batch_size: 2
  85. TestReader:
  86. inputs_def:
  87. image_shape: [3, *eval_height, *eval_width]
  88. sample_transforms:
  89. - Decode: {}
  90. - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2}
  91. - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
  92. - Permute: {}
  93. batch_size: 1
  94. # optimizer
  95. epoch: 80
  96. LearningRate:
  97. base_lr: 0.002
  98. schedulers:
  99. - !CosineDecay
  100. max_epochs: 96
  101. - !LinearWarmup
  102. start_factor: 0.
  103. epochs: 5
  104. OptimizerBuilder:
  105. optimizer:
  106. momentum: 0.9
  107. type: Momentum
  108. regularizer:
  109. factor: 0.0005
  110. type: L2