yolo11-obb.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
  2. # Ultralytics YOLO11-obb Oriented Bounding Boxes (OBB) model with P3/8 - P5/32 outputs
  3. # Model docs: https://docs.ultralytics.com/models/yolo11
  4. # Task docs: https://docs.ultralytics.com/tasks/obb
  5. # Parameters
  6. nc: 80 # number of classes
  7. scales: # model compound scaling constants, i.e. 'model=yolo11n-obb.yaml' will call yolo11-obb.yaml with scale 'n'
  8. # [depth, width, max_channels]
  9. n: [0.50, 0.25, 1024] # summary: 344 layers, 2695747 parameters, 2695731 gradients, 6.9 GFLOPs
  10. s: [0.50, 0.50, 1024] # summary: 344 layers, 9744931 parameters, 9744915 gradients, 22.7 GFLOPs
  11. m: [0.50, 1.00, 512] # summary: 434 layers, 20963523 parameters, 20963507 gradients, 72.2 GFLOPs
  12. l: [1.00, 1.00, 512] # summary: 656 layers, 26220995 parameters, 26220979 gradients, 91.3 GFLOPs
  13. x: [1.00, 1.50, 512] # summary: 656 layers, 58875331 parameters, 58875315 gradients, 204.3 GFLOPs
  14. # YOLO11n backbone
  15. backbone:
  16. # [from, repeats, module, args]
  17. - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
  18. - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
  19. - [-1, 2, C3k2, [256, False, 0.25]]
  20. - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
  21. - [-1, 2, C3k2, [512, False, 0.25]]
  22. - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
  23. - [-1, 2, C3k2, [512, True]]
  24. - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
  25. - [-1, 2, C3k2, [1024, True]]
  26. - [-1, 1, SPPF, [1024, 5]] # 9
  27. - [-1, 2, C2PSA, [1024]] # 10
  28. # YOLO11n head
  29. head:
  30. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  31. - [[-1, 6], 1, Concat, [1]] # cat backbone P4
  32. - [-1, 2, C3k2, [512, False]] # 13
  33. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  34. - [[-1, 4], 1, Concat, [1]] # cat backbone P3
  35. - [-1, 2, C3k2, [256, False]] # 16 (P3/8-small)
  36. - [-1, 1, Conv, [256, 3, 2]]
  37. - [[-1, 13], 1, Concat, [1]] # cat head P4
  38. - [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium)
  39. - [-1, 1, Conv, [512, 3, 2]]
  40. - [[-1, 10], 1, Concat, [1]] # cat head P5
  41. - [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large)
  42. - [[16, 19, 22], 1, OBB, [nc, 1]] # Detect(P3, P4, P5)