rtcdet_config.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # yolov8-v2 Config
  2. rtcdet_cfg = {
  3. 'rtcdet_n':{
  4. # ---------------- Model config ----------------
  5. ## Backbone
  6. 'bk_act': 'silu',
  7. 'bk_norm': 'BN',
  8. 'bk_depthwise': False,
  9. 'width': 0.25,
  10. 'depth': 0.34,
  11. 'stride': [8, 16, 32], # P3, P4, P5
  12. 'max_stride': 32,
  13. 'reg_max': 16,
  14. ## Neck: SPP
  15. 'neck': 'sppf',
  16. 'neck_expand_ratio': 0.5,
  17. 'pooling_size': 5,
  18. 'neck_act': 'silu',
  19. 'neck_norm': 'BN',
  20. 'neck_depthwise': False,
  21. ## Neck: PaFPN
  22. 'fpn': 'rtc_pafpn',
  23. 'fpn_act': 'silu',
  24. 'fpn_norm': 'BN',
  25. 'fpn_depthwise': False,
  26. ## Head
  27. 'head': 'decoupled_head',
  28. 'head_act': 'silu',
  29. 'head_norm': 'BN',
  30. 'num_cls_head': 2,
  31. 'num_reg_head': 2,
  32. 'head_depthwise': False,
  33. # ---------------- Train config ----------------
  34. ## Input
  35. 'multi_scale': [0.5, 1.5], # 320 -> 960
  36. 'trans_type': 'yolov5_s',
  37. # ---------------- Assignment config ----------------
  38. ## Matcher
  39. 'matcher': "simota",
  40. 'matcher_hpy': {'center_sampling_radius': 2.5,
  41. 'topk_candidate': 10,
  42. },
  43. # ---------------- Loss config ----------------
  44. 'loss_cls_weight': 0.5,
  45. 'loss_box_weight': 7.5,
  46. 'loss_dfl_weight': 1.5,
  47. # ---------------- Train config ----------------
  48. 'trainer_type': 'rtcdet',
  49. },
  50. 'rtcdet_s':{
  51. # ---------------- Model config ----------------
  52. ## Backbone
  53. 'bk_act': 'silu',
  54. 'bk_norm': 'BN',
  55. 'bk_depthwise': False,
  56. 'width': 0.50,
  57. 'depth': 0.34,
  58. 'stride': [8, 16, 32], # P3, P4, P5
  59. 'max_stride': 32,
  60. 'reg_max': 16,
  61. ## Neck: SPP
  62. 'neck': 'sppf',
  63. 'neck_expand_ratio': 0.5,
  64. 'pooling_size': 5,
  65. 'neck_act': 'silu',
  66. 'neck_norm': 'BN',
  67. 'neck_depthwise': False,
  68. ## Neck: PaFPN
  69. 'fpn': 'rtc_pafpn',
  70. 'fpn_act': 'silu',
  71. 'fpn_norm': 'BN',
  72. 'fpn_depthwise': False,
  73. ## Head
  74. 'head': 'decoupled_head',
  75. 'head_act': 'silu',
  76. 'head_norm': 'BN',
  77. 'num_cls_head': 2,
  78. 'num_reg_head': 2,
  79. 'head_depthwise': False,
  80. # ---------------- Train config ----------------
  81. ## Input
  82. 'multi_scale': [0.5, 1.5], # 320 -> 960
  83. 'trans_type': 'yolov5_s',
  84. # ---------------- Assignment config ----------------
  85. ## Matcher
  86. 'matcher': "simota",
  87. 'matcher_hpy': {'center_sampling_radius': 2.5,
  88. 'topk_candidate': 10,
  89. },
  90. # ---------------- Loss config ----------------
  91. 'loss_cls_weight': 0.5,
  92. 'loss_box_weight': 7.5,
  93. 'loss_dfl_weight': 1.5,
  94. # ---------------- Train config ----------------
  95. 'trainer_type': 'rtcdet',
  96. },
  97. }