yolov13.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. nc: 5 # number of classes
  2. scales: # model compound scaling constants, i.e. 'model=yolov13n.yaml' will call yolov13.yaml with scale 'n'
  3. # [depth, width, max_channels]
  4. n: [0.50, 0.25, 1024] # Nano
  5. s: [0.50, 0.50, 1024] # Small
  6. l: [1.00, 1.00, 512] # Large
  7. x: [1.00, 1.50, 512] # Extra Large
  8. backbone:
  9. # [from, repeats, module, args]
  10. - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
  11. - [-1, 1, Conv, [128, 3, 2, 1, 2]] # 1-P2/4
  12. - [-1, 2, DSC3k2, [256, False, 0.25]]
  13. - [-1, 1, Conv, [256, 3, 2, 1, 4]] # 3-P3/8
  14. - [-1, 2, DSC3k2, [512, False, 0.25]]
  15. - [-1, 1, DSConv, [512, 3, 2]] # 5-P4/16
  16. - [-1, 4, A2C2f, [512, True, 4]]
  17. - [-1, 1, DSConv, [1024, 3, 2]] # 7-P5/32
  18. - [-1, 4, A2C2f, [1024, True, 1]] # 8
  19. head:
  20. - [[4, 6, 8], 2, HyperACE, [512, 8, True, True, 0.5, 1, "both"]]
  21. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  22. - [ 9, 1, DownsampleConv, []]
  23. - [[6, 9], 1, FullPAD_Tunnel, []] #12
  24. - [[4, 10], 1, FullPAD_Tunnel, []] #13
  25. - [[8, 11], 1, FullPAD_Tunnel, []] #14
  26. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  27. - [[-1, 12], 1, Concat, [1]] # cat backbone P4
  28. - [-1, 2, DSC3k2, [512, True]] # 17
  29. - [[-1, 9], 1, FullPAD_Tunnel, []] #18
  30. - [17, 1, nn.Upsample, [None, 2, "nearest"]]
  31. - [[-1, 13], 1, Concat, [1]] # cat backbone P3
  32. - [-1, 2, DSC3k2, [256, True]] # 21
  33. - [10, 1, Conv, [256, 1, 1]]
  34. - [[21, 22], 1, FullPAD_Tunnel, []] #23
  35. - [-1, 1, Conv, [256, 3, 2]]
  36. - [[-1, 18], 1, Concat, [1]] # cat head P4
  37. - [-1, 2, DSC3k2, [512, True]] # 26
  38. - [[-1, 9], 1, FullPAD_Tunnel, []]
  39. - [26, 1, Conv, [512, 3, 2]]
  40. - [[-1, 14], 1, Concat, [1]] # cat head P5
  41. - [-1, 2, DSC3k2, [1024,True]] # 30 (P5/32-large)
  42. - [[-1, 11], 1, FullPAD_Tunnel, []]
  43. - [[23, 27, 31], 1, Detect, [nc]] # Detect(P3, P4, P5)