YOLOX-T.yaml 3.1 KB

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