{
  "id": 7431560,
  "title": "Stop Slouching! Build a Real-time AI Posture Guard with MediaPipe and Vue.js",
  "url": "https://urgent.news/2026/09/15/stop-slouching-build-a-real-time-ai-posture-guard-with-mediapipe-and",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-15T00:18:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/beck_moulton/stop-slouching-build-a-real-time-ai-posture-guard-with-mediapipe-and-vuejs-255n"
  },
  "original_language": "en",
  "account": "In this tutorial, we aim to create a browser-based Posture Guardian tool using real-time computer vision and pose estimation. The tool focuses on detecting slouching, forward head posture (tech neck), and uneven shoulders. We will utilize MediaPipe and Vue.js to achieve a seamless user experience, alerting the user as soon as their ergonomics deteriorate. This practical application of machine learning in the browser will help engineers and individuals improve their posture and overall productivity.\n\nThe architecture of our Posture Guardian system relies on capturing frames from the webcam, processing them through a pre-trained MediaPipe Pose model to identify skeletal landmarks, and then calculating angles to determine the user's posture. The system consists of several components, each playing a crucial role in the overall functionality.\n\nFirstly, we need to capture the webcam stream and feed it into the MediaPipe Pose model. This model identifies 33 landmarks on the human body, which are essential for posture analysis. In our implementation, we focus on the ears, shoulders, and hips, as these points provide valuable information for detecting slouching and other posture issues.\n\nNext, we analyze the posture data using the pose landmarks. To detect forward head posture, we calculate the horizontal distance and angle between the ears and shoulders. If the ear position moves too far forward relative to the shoulder line, we can confidently state that the user is slouching. By setting a threshold of 15%, we determine when the user's posture is in need of improvement.\n\nFinally, we integrate our posture analysis with a Vue.js component. The component uses the Webcam API to feed the video stream into the MediaPipe Pose model. We draw landmarks on the canvas to visualize the user's pose and display the analysis results through an alert box and a visual overlay. The status of the posture is represented by a class, which triggers the appropriate styling for the alert box.",
  "summary": "Let's be honest: as engineers, our \"focus mode\" usually involves leaning into the monitor until our noses almost touch the screen. We start the day sitting like a king and end it looking like a question mark. Back pain isn't just a meme; it's a productivity killer. In this tutorial, we’re building Posture Guardian , a browser-based tool using real-time computer vision and pose estimation to…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}