Pose Estimation

Pose Estimation1. Model Introduction2. Start2.1. Enter docker2.2. Pose estimation: imageEffect preview2.3, Pose Estimation: VideoEffect Preview2.4, Pose Estimation: Real-time DetectionEffect PreviewReferences

Use Python to demonstrate the effect of Ultralytics: Pose Estimation in image, video, and real-time detection.

1. Model Introduction

Pose estimation is a task that involves identifying the location of specific points (usually called key points) in an image. Key points can represent parts of an object, such as joints, landmarks, or other significant features. The location of key points is usually represented by a set of two-dimensional [x, y] or 3D [x, y, visible] coordinates

The output of the pose estimation model is a set of points representing the key points of objects in the image, and usually also includes a confidence score for each point. Pose estimation is a good choice when you need to identify specific parts of objects in the scene and their positional relationship with each other.

In the default pose model of YOLO11, there are 17 key points, each representing a different part of the human body. Here is the mapping of each index to the corresponding body joint:

  1. Nose
  2. Left eye
  3. Right eye
  4. Left ear
  5. Right ear
  6. Left shoulder
  7. Right shoulder
  8. Left elbow
  9. Right elbow
  10. Left wrist
  11. Right wrist
  12. Left hip
  13. Right hip
  14. Left knee
  15. Right knee
  16. Left ankle
  17. Right ankle

2. Start

2.1. Enter docker

Run YOLOv11's docker script

2.2. Pose estimation: image

Use yolo11n-pose.pt to predict the image under the ultralytics project (not the image that comes with ultralytics).

Enter the code folder:

Run the code:

Effect preview

Yolo recognizes the output image location: /ultralytics/ultralytics/output/

1. View using jupyter lab

Open another terminal to enter the docker container and use jupyter lab to view the image

image-20250324155841464

image-20250324155023395

Access directly through http://localhost:8080/ in the system browser:

image-20250324181753848

2. Copy the file to the host machine for viewing

Enter the following command in the host terminal

image-20241230170043997

Sample code:

2.3, Pose Estimation: Video

Use yolo11n-pose.pt to predict the video under the ultralytics project (not the video that comes with ultralytics).

Enter the code folder:

Run the code:

Effect Preview

Video location of yolo recognition output: /ultralytics/ultralytics/output/

The output video will be displayed in real time during the code running process. If you want to view the video later, you can refer to the above [2. Copy the file to the host machine for viewing] tutorial operation.

image-20241230170512899

Sample code:

2.4, Pose Estimation: Real-time Detection

Use yolo11n-pose.pt to predict the USB camera screen.

Enter the code folder:

Run the code: Click the preview screen, press the q key to terminate the program!

Effect Preview

Video location of yolo recognition output: /ultralytics/ultralytics/output/

The camera screen will be displayed in real time during the code running. If you want to view the video later, you can refer to the above [2. Copy the file to the host machine for viewing] tutorial operation.

image-20241230171319586

Sample code:

References

https://docs.ultralytics.com/tasks/pose/