yolov8-pose.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
  2. # Ultralytics YOLOv8-pose keypoints/pose estimation model with P3/8 - P5/32 outputs
  3. # Model docs: https://docs.ultralytics.com/models/yolov8
  4. # Task docs: https://docs.ultralytics.com/tasks/pose
  5. # Parameters
  6. nc: 1 # number of classes
  7. kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
  8. scales: # model compound scaling constants, i.e. 'model=yolov8n-pose.yaml' will call yolov8-pose.yaml with scale 'n'
  9. # [depth, width, max_channels]
  10. n: [0.33, 0.25, 1024]
  11. s: [0.33, 0.50, 1024]
  12. m: [0.67, 0.75, 768]
  13. l: [1.00, 1.00, 512]
  14. x: [1.00, 1.25, 512]
  15. # YOLOv8.0n backbone
  16. backbone:
  17. # [from, repeats, module, args]
  18. - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
  19. - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
  20. - [-1, 3, C2f, [128, True]]
  21. - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
  22. - [-1, 6, C2f, [256, True]]
  23. - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
  24. - [-1, 6, C2f, [512, True]]
  25. - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
  26. - [-1, 3, C2f, [1024, True]]
  27. - [-1, 1, SPPF, [1024, 5]] # 9
  28. # YOLOv8.0n head
  29. head:
  30. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  31. - [[-1, 6], 1, Concat, [1]] # cat backbone P4
  32. - [-1, 3, C2f, [512]] # 12
  33. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  34. - [[-1, 4], 1, Concat, [1]] # cat backbone P3
  35. - [-1, 3, C2f, [256]] # 15 (P3/8-small)
  36. - [-1, 1, Conv, [256, 3, 2]]
  37. - [[-1, 12], 1, Concat, [1]] # cat head P4
  38. - [-1, 3, C2f, [512]] # 18 (P4/16-medium)
  39. - [-1, 1, Conv, [512, 3, 2]]
  40. - [[-1, 9], 1, Concat, [1]] # cat head P5
  41. - [-1, 3, C2f, [1024]] # 21 (P5/32-large)
  42. - [[15, 18, 21], 1, Pose, [nc, kpt_shape]] # Pose(P3, P4, P5)