A real-time posture detection app built with OpenCV, MediaPipe, and PyQT.
It uses your webcam to detect your body landmarks and determine whether you are sitting or standing with good posture.
- Live camera feed with pose landmark tracking
- Calculates a posture ratio using the position of your nose and shoulders
- Displays “Good” or “Bad” posture status in real time
- UI made with PyQT with adjustable settings
- MediaPipe Pose detects 33 key body landmarks in real time.
- The app measures the vertical distance between your nose and shoulders,
normalized by the distance between your shoulders. - This gives a posture ratio that adjusts for distance from the camera.
- If the ratio falls below a set threshold (default
0.75), it’s labeled “Bad Posture.”
git clone https://github.com/Jshepherd06/Posture-Checker.git
cd posture-checkerIf you are using the provided pyproject.toml:
pip install .or you can do it manually:
pip install PyQt6 opencv-python mediapipe numpy pygameOpen terminal or cd into pyqt/ folder then run the pyqt app:
python main.pyThis will open the application
OpenCV – Real-time camera use
MediaPipe – Human pose detection
PyQT – UI framework
NumPy
PyGame – Audio handling
matplotlib
- Statistics visualization
- improve readme
- executable for simple use of app
- MORE statistical analysis oer longer periods
- improved error handling
- improved UI, allow for adjustable window size
- make threshold on stats page update with calibration