YOLOX-T.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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.375
  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.5, 1.5] # [0.1, 2.0] in YOLOX-s/m/l/x
  40. shear: [-2, 2]
  41. translate: [-0.1, 0.1]
  42. enable_mixup: False # True in YOLOX-s/m/l/x
  43. - AugmentHSV: {is_bgr: False, hgain: 5, sgain: 30, vgain: 30}
  44. - PadResize: {target_size: 640}
  45. - RandomFlip: {}
  46. batch_transforms:
  47. - Permute: {}
  48. batch_size: 8
  49. shuffle: True
  50. drop_last: True
  51. collate_batch: False
  52. mosaic_epoch: 285
  53. EvalReader:
  54. sample_transforms:
  55. - Decode: {}
  56. - Resize: {target_size: [416, 416], keep_ratio: True, interp: 1}
  57. - Pad: {size: [416, 416], fill_value: [114., 114., 114.]}
  58. - Permute: {}
  59. batch_size: 8
  60. TestReader:
  61. inputs_def:
  62. image_shape: [3, 416, 416]
  63. sample_transforms:
  64. - Decode: {}
  65. - Resize: {target_size: [416, 416], keep_ratio: True, interp: 1}
  66. - Pad: {size: [416, 416], fill_value: [114., 114., 114.]}
  67. - Permute: {}
  68. batch_size: 1
  69. architecture: YOLOX
  70. norm_type: sync_bn
  71. use_ema: True
  72. ema_decay: 0.9999
  73. ema_decay_type: "exponential"
  74. act: silu
  75. find_unused_parameters: True
  76. YOLOX:
  77. backbone: CSPDarkNet
  78. neck: YOLOCSPPAN
  79. head: YOLOXHead
  80. size_stride: 32
  81. size_range: [10, 20] # multi-scale ragne [320*320 ~ 640*640]
  82. CSPDarkNet:
  83. arch: "X"
  84. return_idx: [2, 3, 4]
  85. depthwise: False
  86. YOLOCSPPAN:
  87. depthwise: False
  88. YOLOXHead:
  89. l1_epoch: 285
  90. depthwise: False
  91. loss_weight: {cls: 1.0, obj: 1.0, iou: 5.0, l1: 1.0}
  92. assigner:
  93. name: SimOTAAssigner
  94. candidate_topk: 10
  95. use_vfl: False
  96. nms:
  97. name: MultiClassNMS
  98. nms_top_k: 10000
  99. keep_top_k: 1000
  100. score_threshold: 0.001
  101. nms_threshold: 0.65
  102. epoch: 300
  103. LearningRate:
  104. base_lr: 0.01
  105. schedulers:
  106. - !CosineDecay
  107. max_epochs: 300
  108. min_lr_ratio: 0.05
  109. last_plateau_epochs: 15
  110. - !ExpWarmup
  111. epochs: 5
  112. OptimizerBuilder:
  113. optimizer:
  114. type: Momentum
  115. momentum: 0.9
  116. use_nesterov: True
  117. regularizer:
  118. factor: 0.0005
  119. type: L2
  120. # Exporting the model
  121. export:
  122. post_process: True # Whether post-processing is included in the network when export model.
  123. nms: True # Whether NMS is included in the network when export model.
  124. benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  125. fuse_conv_bn: False