From 5309ee09052d42f34d1cba9aaa79522098015c1b Mon Sep 17 00:00:00 2001 From: harshada Date: Wed, 4 Nov 2026 05:34:12 +0000 Subject: [PATCH] Update README.md --- README.md | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 102 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f16903b..cb94f63 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,106 @@ -**Task Title:** Pose Estimation Using Python +# Task 04: Pose Estimation Using Python -**Description:** -Implement and test the `04_pose-estimation.py` script to perform pose estimation on the input images or video and detect body keypoints with visualization. +## Task Title -**Command to Run:** -```bash -python 04_pose-estimation.py +Pose Estimation Using Python + +## Description + +Implement and test the `04_pose_estimation.py` script on the Jetson Orin Nano. Runs YOLO26n-pose to detect people and their 17 body keypoints (nose, eyes, ears, shoulders, elbows, wrists, hips, knees, ankles) and draws the skeleton on screen. + +## When to Use + +Use this for human activity analysis, fitness or posture checks, gesture-based control, and fall detection. + +## Hardware and Software + +- Device: NVIDIA Jetson Orin Nano (JetPack with CUDA and TensorRT) +- Camera: USB webcam (for example Logitech BRIO 100) at CAMERA_INDEX 0 +- Language: Python 3 +- Model: YOLO26 (Ultralytics), weights `yolo26n-pose.pt` +- Libraries: ultralytics, opencv-python, numpy + +## Installation + +``` +pip install ultralytics opencv-python ``` -Verify the script execution and validate the pose estimation output and keypoint visualization. \ No newline at end of file +On Jetson, install the JetPack-matched PyTorch and torchvision builds first (see the Ultralytics Jetson guide in the references). Model weights download automatically on first run if the machine is online. + +## Command to Run + +``` +python3 04_pose_estimation.py +``` + +Check the camera is visible before running: + +``` +ls /dev/video* +``` + +## How It Works + +1. Load the pose weights (yolo26n-pose.pt). +2. Open the camera feed (or an input image or video). +3. Run the model on each frame. +4. Read keypoints and confidences from the result. +5. Draw the keypoints and connecting skeleton lines, plus FPS. Press Q to quit. + +## Settings You Can Change + +Edit these values at the top of the script: + +- CAMERA_INDEX, FRAME_W, FRAME_H : camera options +- CONF_THRESHOLD : minimum person confidence +- Keypoint confidence limit for drawing a joint, if defined +- MODEL_WEIGHTS = yolo26n-pose.pt + +## Controls + +- Press `Q` to quit the live window + +## Verify the Output + +Run `python3 04_pose_estimation.py` and confirm: + +- [ ] A live window opens and a skeleton is drawn on each person. +- [ ] Joints move smoothly with the body. +- [ ] Keypoints are visible for the whole body when the person is fully in frame. +- [ ] Q closes the window. + +## Optional: Faster Inference with TensorRT + +For higher FPS on the Orin Nano, export the model to a TensorRT engine once and point `MODEL_WEIGHTS` to the engine file: + +``` +yolo export model=yolo26n-pose.pt format=engine half=True +``` + +Then set `MODEL_WEIGHTS = 'yolo26n-pose.engine'` in the script. + +## Troubleshooting + +- Camera not opening: check `ls /dev/video*`, try CAMERA_INDEX 1, and make sure no other app is using the camera. +- Window does not show over SSH: run on the Jetson desktop, or use X11 forwarding. +- Low FPS: use the nano model, lower FRAME_W / FRAME_H, run `sudo nvpmodel -m 0` and `sudo jetson_clocks`, or export to TensorRT. +- Weights not found: connect to the internet for the first run or copy the .pt file next to the script. +- Out of memory: close other apps and reduce the input size. + +## How This Differs From the Other Tasks + +Finds body joints, whereas 01 to 03 only find objects or shapes. + +Files in this folder: 01_detection, 02_tracking, 03_segmentation, 04_pose_estimation, 05_classification, 06_roi_detection, 07_obb_detection, 08_depth_estimation. + +## References + +- [Pose estimation task docs](https://docs.ultralytics.com/tasks/pose/) +- [COCO keypoints dataset](https://docs.ultralytics.com/datasets/pose/coco/) +- [Workouts monitoring solution](https://docs.ultralytics.com/guides/workouts-monitoring/) +- [Ultralytics YOLO26 model page](https://docs.ultralytics.com/models/yolo26/) +- [Ultralytics on NVIDIA Jetson guide](https://docs.ultralytics.com/guides/nvidia-jetson/) +- [TensorRT export](https://docs.ultralytics.com/integrations/tensorrt/) +- [Ultralytics GitHub](https://github.com/ultralytics/ultralytics) +- [JetPack SDK](https://developer.nvidia.com/embedded/jetpack) \ No newline at end of file