A real-time, sensorless ergonomic posture assessment system that uses MediaPipe Pose Estimation to detect skeletal keypoints from video and classify worker posture risk according to the Mahale Industrial Posture Standard.
Traditional ergonomic assessments (REBA, RULA, OWAS) rely on manual, subjective, snapshot-based observation. This project automates that process — continuously, objectively, and without wearable sensors — making it practical for real industrial deployment.
- Pose detection — 33 body landmarks extracted per frame via MediaPipe (CPU-friendly, no GPU required).
- Three biomechanical indicators:
- Waist Flexion Angle (forward bending)
- Trunk Rotation Angle (body twisting)
- Arm Height Position (hand elevation relative to shoulder/waist)
- Automated risk classification into Level 1 (High Risk), Level 2 (Moderate Risk), Level 3 (Easy/Safe).
- Real-time on-screen annotation of angles and risk levels.
- CSV data logging of every frame's measurements for offline analysis.
- Visualizations — risk-distribution pie charts and posture time-series trend graphs.
| Metric | Level 1 (High Risk) | Level 2 (Moderate Risk) | Level 3 (Easy/Safe) |
|---|---|---|---|
| Waist Flexion | > 30° | 15°–30° | 0°–15° |
| Trunk Rotation | ≥ 45° | 15°–45° | 0°–15° |
| Arm Height | Above shoulder | Shoulder height | Waist height |
Video Input → Pose Estimation (MediaPipe) → Angle Calculations
→ Risk Classification (Mahale Standard) → Output Visualization
→ Data Logging (CSV)
automated-ergonomic-analysis/
├── src/
│ └── ergonomic_analysis.py # Main pipeline: detection, angles, risk, CSV, charts
├── docs/
│ ├── project_report.pdf # Full minor project report
│ └── presentation.pptx # Project presentation slides
├── results/ # Generated CSVs and charts land here
├── data/ # Place input videos here
├── requirements.txt
└── README.md
git clone https://github.com/<your-username>/automated-ergonomic-analysis.git
cd automated-ergonomic-analysis
pip install -r requirements.txtRun on a pre-recorded video:
python src/ergonomic_analysis.py --video data/your_video.mp4Run on a live webcam feed:
python src/ergonomic_analysis.py --webcamRun headless (no preview window, e.g. on a server):
python src/ergonomic_analysis.py --video data/your_video.mp4 --no-displayResults are written to results/posture_results.csv, and two charts (risk_distribution.png, posture_trends.png) are generated automatically after processing.
- Python 3.8+
- OpenCV
- MediaPipe
- NumPy / Pandas
- Matplotlib
See requirements.txt for exact versions.
| Component | Minimum Spec |
|---|---|
| Processor | Intel i5 / AMD Ryzen 5 or higher |
| RAM | 8 GB (16 GB recommended) |
| GPU | Optional — MediaPipe is CPU-optimized |
| Camera | HD Webcam / Mobile Camera / CCTV feed |
In a sample 1,384-frame industrial task recording:
| Metric | Level 1 | Level 2 | Level 3 |
|---|---|---|---|
| Waist Flexion | 0% | 10.9% | 89.1% |
| Trunk Rotation | 0.5% | 4.5% | 95.0% |
| Arm Height | 0% | 4.0% | 96.0% |
The worker maintained predominantly safe posture throughout, with only brief, isolated high-rotation moments — indicating the workstation layout is ergonomically sound overall.
- Multi-worker tracking in shared workspaces
- 3D depth accuracy via stereo/depth cameras (Intel RealSense, Kinect)
- Real-time audio/visual corrective feedback ("Avoid Twisting", "Stand Upright")
- ML-based posture/fatigue prediction
- Integration with industrial safety dashboards
- Mobile and edge deployment
Full literature review and citation list available in docs/project_report.pdf.
This project is released under the MIT License.

