Welcome to ROSMASTER M3 repository
5.Pose estimation
Pose estimation
Note: Using the Docker container in the factory image does not require re-setting up the environment. The environment is already set up. Simply enter Docker and run the corresponding function commands according to the previous tutorial.
1. Pose Estimation: Image
Use yolo11n-pose.pt to predict the image provided with the Ultralytics project.
Go to the code folder:
cd /root/ultralytics/ultralytics/yahboom_demo
Run the code:
xxxxxxxxxxpython3 03.pose_image.py
Preview
Yolo recognition output image location: /root/ultralytics/ultralytics/output/

Sample code:
xfrom ultralytics import YOLO# Load a modelmodel = YOLO("/root/ultralytics/ultralytics/yolo11n-pose.pt") # pretrained yolo11n-pose model# model = YOLO("/root/ultralytics/ultralytics/yolo11n-pose.onnx")# model = YOLO("/root/ultralytics/ultralytics/yolo11n-pose_ncnn_model")# Run batched inference on a list of imagesresults = model("/root/ultralytics/ultralytics/assets/people.jpg") # return a list of Results objects# Process results listfor result in results: # boxes = result.boxes # Boxes object for bounding box outputs # masks = result.masks # Masks object for segmentation masks outputs keypoints = result.keypoints # Keypoints object for pose outputs # probs = result.probs # Probs object for classification outputs # obb = result.obb # Oriented boxes object for OBB outputs result.show() # display to screen result.save(filename="/root/ultralytics/ultralytics/output/people_output.jpg") # save to disk2. Instance Segmentation: Video
Use yolo11n-pose.pt to predict videos in the Ultralytics project (not included with Ultralytics).
Go to the code folder:
xxxxxxxxxxcd /root/ultralytics/ultralytics/yahboom_demo
Run the code:
xxxxxxxxxxpython3 03.pose_video.py
Preview
Yolo recognition output video location: /root/ultralytics/ultralytics/output/

Sample code:
xxxxxxxxxximport cv2from ultralytics import YOLO# Load the YOLO modelmodel = YOLO