YOLOX-S.yaml 3.4 KB

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