yolov8-cls.yaml 1019 B

1234567891011121314151617181920212223242526272829303132
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
  2. # Ultralytics YOLOv8-cls image classification model with YOLO backbone
  3. # Model docs: https://docs.ultralytics.com/models/yolov8
  4. # Task docs: https://docs.ultralytics.com/tasks/classify
  5. # Parameters
  6. nc: 1000 # number of classes
  7. scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n'
  8. # [depth, width, max_channels]
  9. n: [0.33, 0.25, 1024]
  10. s: [0.33, 0.50, 1024]
  11. m: [0.67, 0.75, 1024]
  12. l: [1.00, 1.00, 1024]
  13. x: [1.00, 1.25, 1024]
  14. # YOLOv8.0n 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, 3, C2f, [128, True]]
  20. - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
  21. - [-1, 6, C2f, [256, True]]
  22. - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
  23. - [-1, 6, C2f, [512, True]]
  24. - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
  25. - [-1, 3, C2f, [1024, True]]
  26. # YOLOv8.0n head
  27. head:
  28. - [-1, 1, Classify, [nc]] # Classify