YOLOX-S.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. depth_mult: 0.33
  11. width_mult: 0.50
  12. metric: COCO
  13. num_classes: 80
  14. TrainDataset:
  15. name: COCODataSet
  16. image_dir: train2017
  17. anno_path: annotations/instances_train2017.json
  18. dataset_dir: dataset/coco
  19. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  20. EvalDataset:
  21. name: COCODataSet
  22. image_dir: val2017
  23. anno_path: annotations/instances_val2017.json
  24. dataset_dir: dataset/coco
  25. allow_empty: true
  26. TestDataset:
  27. name: ImageFolder
  28. anno_path: annotations/instances_val2017.json # also support txt (like VOC's label_list.txt)
  29. dataset_dir: dataset/coco # if set, anno_path will be 'dataset_dir/anno_path'
  30. worker_num: 4
  31. TrainReader:
  32. sample_transforms:
  33. - Decode: {}
  34. - Mosaic:
  35. prob: 1.0
  36. input_dim: [640, 640]
  37. degrees: [-10, 10]
  38. scale: [0.1, 2.0]
  39. shear: [-2, 2]
  40. translate: [-0.1, 0.1]
  41. enable_mixup: True
  42. mixup_prob: 1.0
  43. mixup_scale: [0.5, 1.5]
  44. - AugmentHSV: {is_bgr: False, hgain: 5, sgain: 30, vgain: 30}
  45. - PadResize: {target_size: 640}
  46. - RandomFlip: {}
  47. batch_transforms:
  48. - Permute: {}
  49. batch_size: 8
  50. shuffle: True
  51. drop_last: True
  52. collate_batch: False
  53. mosaic_epoch: 285
  54. EvalReader:
  55. sample_transforms:
  56. - Decode: {}
  57. - Resize: {target_size: [640, 640], keep_ratio: True, interp: 1}
  58. - Pad: {size: [640, 640], fill_value: [114., 114., 114.]}
  59. - Permute: {}
  60. batch_size: 4
  61. TestReader:
  62. inputs_def:
  63. image_shape: [3, 640, 640]
  64. sample_transforms:
  65. - Decode: {}
  66. - Resize: {target_size: [640, 640], keep_ratio: True, interp: 1}
  67. - Pad: {size: [640, 640], fill_value: [114., 114., 114.]}
  68. - Permute: {}
  69. batch_size: 1
  70. architecture: YOLOX
  71. norm_type: sync_bn
  72. use_ema: True
  73. ema_decay: 0.9999
  74. ema_decay_type: "exponential"
  75. act: silu
  76. find_unused_parameters: True
  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