yolo11-cls-resnet18.yaml 794 B

123456789101112131415161718192021222324
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
  2. # Ultralytics YOLO11-cls image classification model with ResNet18 backbone
  3. # Model docs: https://docs.ultralytics.com/models/yolo11
  4. # Task docs: https://docs.ultralytics.com/tasks/classify
  5. # Parameters
  6. nc: 10 # number of classes
  7. scales: # model compound scaling constants, i.e. 'model=yolo11n-cls.yaml' will call yolo11-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. # ResNet18 backbone
  15. backbone:
  16. # [from, repeats, module, args]
  17. - [-1, 1, TorchVision, [512, "resnet18", "DEFAULT", True, 2]] # truncate two layers from the end
  18. # YOLO11n head
  19. head:
  20. - [-1, 1, Classify, [nc]] # Classify