yolov8-pose.yaml 1.5 KB

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