Skip to content

Computer Vision: Height Detection using OpenCV, Yolov8n-pose.pt, Calibration, Aruco

Notifications You must be signed in to change notification settings

shakyarahul435/HeightDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Human Height Measurement using YOLOv8 Pose + ArUco Marker (Tilt-Corrected)

This project measures a person's height in feet & inches (or cm) in real time using:

  • YOLOv8 Pose for human keypoint detection
  • ArUco marker for accurate distance and camera pitch estimation
  • Camera calibration + perspective correction

Tested and working with Python 3.11


Requirements

Python 3.11 

1. Create and Activate Virtual Environment

Create virtual environment

py -3.11 -m venv height-env

Activate it

Windows:

env\Scripts\Activate

macOS / Linux:

source env/bin/activate

2. Install Dependencies

Run this command once inside the activated environment:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install opencv-python numpy ultralytics

(If you don't have a CUDA GPU, use CPU-only torch: pip install torch torchvision torchaudio)

3. Download YOLOv8 Pose Model (Automatic)

The script will automatically download yolov8n-pose.pt on first run.

4. Print & Place ArUco Marker

Marker ID: 0
Dictionary: 6x6_250
You can generate it here: https://chev.me/arucogen/

5. First Run - Camera Calibration

On first launch, the script will ask you to calibrate using a chessboard (9×6). Print a standard chessboard pattern and follow on-screen instructions.

About

Computer Vision: Height Detection using OpenCV, Yolov8n-pose.pt, Calibration, Aruco

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages