Back to Projects

1 / 8
AI / Computer VisionLive
Ergonomic Posture Assessment Agent
2025
AI agent analysing human posture from images using MediaPipe landmark detection, serving ergonomic scores via FastAPI, containerised with Docker and deployed on Hugging Face Spaces.
AI/ML
Tech Stack
PythonFastAPIMediaPipeOpenCVDockerHugging Face Spaces
Key Highlights
- Built an AI agent that analyses human posture from images using MediaPipe Pose landmark detection (33 keypoints) and OpenCV geometric processing to assess ergonomic sitting and standing alignment.
- Developed a FastAPI REST API with endpoints for posture scoring (/analyze, 0–100 scale), natural-language ergonomic feedback (/feedback), and uptime monitoring (/health).
- Implemented a rule-based scoring engine measuring 12 angular metrics (spine curvature, shoulder asymmetry, neck tilt, hip alignment), each contributing to a weighted composite posture score.
- Containerised with Docker using multi-stage builds to minimise production image size; deployed publicly on Hugging Face Spaces with automatic health-check monitoring.
- Added a Gradio-based interactive web interface allowing users to upload images and receive annotated posture feedback directly in the browser without needing an API client.
- Optimised inference speed to under 120ms per image on CPU by caching MediaPipe model initialisation and using NumPy vectorised angle calculations instead of per-landmark loops.