yolov8-pose-p6.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
  2. # Ultralytics YOLOv8-pose keypoints/pose estimation model with P3/8 - P6/64 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-p6.yaml' will call yolov8-p6.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.0x6 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, [768, 3, 2]] # 7-P5/32
  26. - [-1, 3, C2f, [768, True]]
  27. - [-1, 1, Conv, [1024, 3, 2]] # 9-P6/64
  28. - [-1, 3, C2f, [1024, True]]
  29. - [-1, 1, SPPF, [1024, 5]] # 11
  30. # YOLOv8.0x6 head
  31. head:
  32. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  33. - [[-1, 8], 1, Concat, [1]] # cat backbone P5
  34. - [-1, 3, C2, [768, False]] # 14
  35. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  36. - [[-1, 6], 1, Concat, [1]] # cat backbone P4
  37. - [-1, 3, C2, [512, False]] # 17
  38. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  39. - [[-1, 4], 1, Concat, [1]] # cat backbone P3
  40. - [-1, 3, C2, [256, False]] # 20 (P3/8-small)
  41. - [-1, 1, Conv, [256, 3, 2]]
  42. - [[-1, 17], 1, Concat, [1]] # cat head P4
  43. - [-1, 3, C2, [512, False]] # 23 (P4/16-medium)
  44. - [-1, 1, Conv, [512, 3, 2]]
  45. - [[-1, 14], 1, Concat, [1]] # cat head P5
  46. - [-1, 3, C2, [768, False]] # 26 (P5/32-large)
  47. - [-1, 1, Conv, [768, 3, 2]]
  48. - [[-1, 11], 1, Concat, [1]] # cat head P6
  49. - [-1, 3, C2, [1024, False]] # 29 (P6/64-xlarge)
  50. - [[20, 23, 26, 29], 1, Pose, [nc, kpt_shape]] # Pose(P3, P4, P5, P6)