A webcam-based posture detection application built in Python using OpenCV, MediaPipe and Tkinter
- Live webcam posture monitoring
- Manual calibration using the user’s upright sitting position
- Detection of:
- good posture
- forward posture
- left lean
- right lean
- Audio alert on bad posture
- Uploaded video analysis
- Session logging and stats view
- Automated pytest tests
- GitHub Actions workflow for automated test runs
app/- main application codetests/- automated pytest test filesdocs/images/- screenshots used in the documentation.github/workflows/- GitHub Actions workflow for automated testing
Install the required packages:
pip install -r requirements.txtRun the application from the project folder:
python app/postureDetectionApp.pyThis project includes automated pytest unit tests for key helper modules.
Test files:
tests/test_core_posture.pytests/test_session_logger.pytests/test_settings_store.py
To run the tests:
python -m pytest tests -vThe project also includes a GitHub Actions workflow to run the tests automatically on pushes and pull requests.
- Python
- OpenCV
- MediaPipe
- Tkinter
- Pillow
- Matplotlib
- Pytest
- GitHub Actions
- add more automated tests
- improve the visual design of the interface
- add a progressive reminder system










