YOLOX-M.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. use_gpu: true
  2. use_xpu: false
  3. use_mlu: false
  4. use_npu: false
  5. log_iter: 100
  6. save_dir: output
  7. snapshot_epoch: 10
  8. print_flops: false
  9. print_params: false
  10. metric: COCO
  11. num_classes: 80
  12. TrainDataset:
  13. name: COCODataSet
  14. image_dir: train2017
  15. anno_path: annotations/instances_train2017.json
  16. dataset_dir: dataset/coco
  17. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  18. EvalDataset:
  19. name: COCODataSet
  20. image_dir: val2017
  21. anno_path: annotations/instances_val2017.json
  22. dataset_dir: dataset/coco
  23. allow_empty: true
  24. TestDataset:
  25. name: ImageFolder
  26. anno_path: annotations/instances_val2017.json # also support txt (like VOC's label_list.txt)
  27. dataset_dir: dataset/coco # if set, anno_path will be 'dataset_dir/anno_path'
  28. worker_num: 4
  29. TrainReader:
  30. sample_transforms:
  31. - Decode: {}
  32. - Mosaic:
  33. prob: 1.0
  34. input_dim: [640, 640]
  35. degrees: [-10, 10]
  36. scale: [0.1, 2.0]
  37. shear: [-2, 2]
  38. translate: [-0.1, 0.1]
  39. enable_mixup: True
  40. mixup_prob: 1.0
  41. mixup_scale: [0.5, 1.5]
  42. - AugmentHSV: {is_bgr: False, hgain: 5, sgain: 30, vgain: 30}
  43. - PadResize: {target_size: 640}
  44. - RandomFlip: {}
  45. batch_transforms:
  46. - Permute: {}
  47. batch_size: 8
  48. shuffle: True
  49. drop_last: True
  50. collate_batch: False
  51. mosaic_epoch: 285
  52. EvalReader:
  53. sample_transforms:
  54. - Decode: {}
  55. - Resize: {target_size: [640, 640], keep_ratio: True, interp: 1}
  56. - Pad: {size: [640, 640], fill_value: [114., 114., 114.]}
  57. - Permute: {}
  58. batch_size: 4
  59. TestReader:
  60. inputs_def:
  61. image_shape: [3, 640, 640]
  62. sample_transforms:
  63. - Decode: {}
  64. - Resize: {target_size: [640, 640], keep_ratio: True, interp: 1}
  65. - Pad: {size: [640, 640], fill_value: [114., 114., 114.]}
  66. - Permute: {}
  67. batch_size: 1
  68. architecture: YOLOX
  69. norm_type: sync_bn
  70. use_ema: True
  71. ema_decay: 0.9999
  72. ema_decay_type: "exponential"
  73. act: silu
  74. find_unused_parameters: True
  75. depth_mult: 0.67
  76. width_mult: 0.75
  77. YOLOX:
  78. backbone: CSPDarkNet
  79. neck: YOLOCSPPAN
  80. head: YOLOXHead
  81. size_stride: 32
  82. size_range: [15, 25] # multi-scale range [480*480 ~ 800*800]
  83. CSPDarkNet:
  84. arch: "X"
  85. return_idx: [2, 3, 4]
  86. depthwise: False
  87. YOLOCSPPAN:
  88. depthwise: False
  89. YOLOXHead:
  90. l1_epoch: 285
  91. depthwise: False
  92. loss_weight: {cls: 1.0, obj: 1.0, iou: 5.0, l1: 1.0}
  93. assigner:
  94. name: SimOTAAssigner
  95. candidate_topk: 10
  96. use_vfl: False
  97. nms:
  98. name: MultiClassNMS
  99. nms_top_k: 10000
  100. keep_top_k: 1000
  101. score_threshold: 0.001
  102. nms_threshold: 0.65
  103. # For speed while keep high mAP, you can modify 'nms_top_k' to 1000 and 'keep_top_k' to 100, the mAP will drop about 0.1%.
  104. # For high speed demo, you can modify 'score_threshold' to 0.25 and 'nms_threshold' to 0.45, but the mAP will drop a lot.
  105. epoch: 300
  106. LearningRate:
  107. base_lr: 0.01
  108. schedulers:
  109. - !CosineDecay
  110. max_epochs: 300
  111. min_lr_ratio: 0.05
  112. last_plateau_epochs: 15
  113. - !ExpWarmup
  114. epochs: 5
  115. OptimizerBuilder:
  116. optimizer:
  117. type: Momentum
  118. momentum: 0.9
  119. use_nesterov: True
  120. regularizer:
  121. factor: 0.0005
  122. type: L2
  123. # Exporting the model
  124. export:
  125. post_process: True # Whether post-processing is included in the network when export model.
  126. nms: True # Whether NMS is included in the network when export model.
  127. benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  128. fuse_conv_bn: False