Smart Work Companion for Posture and Wellness Monitoring using OpenCV and MediaPipe
Abstract
The increasing prevalence of sedentary desk-based work has led to a significant rise in musculoskeletal disorders, eye strain, and reduced workplace productivity. This paper presents Smart Work Companion, a real-time, camera-based wellness monitoring system designed to promote healthy working habits among desk-bound professionals and students. The system leverages OpenCV for live video acquisition and MediaPipe's Pose and FaceMesh solutions to extract biomechanical landmarks for posture assessment and eye blink detection, respectively. Three primary metrics are computed in real time: neck angle, head forward ratio, and shoulder alignment angle, which are fused under a multi-factor decision rule to classify posture as good or bad. An Eye Aspect Ratio (EAR) based blink-rate estimator detects eye strain with a precision blink state machine. A timer-driven wellness module enforces the 20-20-20 rule, water-break intervals, and walk-break reminders. Desktop notifications via the plyer library provide non-intrusive alerts, while a CustomTkinter GUI and CSV logging pipeline enable live monitoring and longitudinal data analysis. Experimental results demonstrate accurate posture detection across varied lighting conditions and reliable blink-rate estimation at 53 blinks per minute for normal sessions. The system presents an affordable and non-wearable alternative to clinical ergonomic monitoring tools.