PoseCheck Pro is an AI-powered web app that guides you through home workouts with real-time posture correction, audio instructions, and personalized stats. Built for a hackathon, it ensures safe exercise form using computer vision, helping prevent injuries from improper squats or arm raises. Whether you're a fitness enthusiast or a developer exploring health tech, PoseCheck Pro offers a seamless, webcam-based fitness experience.
- Real-Time Posture Correction: Uses Mediapipe to track pose landmarks, providing instant feedback (e.g., "Level your shoulders") for arm raises (150-210° angles) and squats (50-90° knee angle).
- Audio Guidance: Delivers step-by-step instructions (e.g., "Hold arms up for 3 seconds") via gTTS, cached as MP3s, played without a visible play bar using JavaScript.
- Personalized Stats: Tracks reps, exercise duration (starts when camera activates), and calories burned (MET-based) based on user height and weight.
- Intuitive UI: Streamlit-powered interface with a two-column layout (webcam feed/debug on left, feedback on right) and sidebar for exercise selection (Arm Raise, Squat) and reps.
- Webcam-Only: Runs on any device with a webcam, with calibration tips for optimal tracking (e.g., "Stand 3-6 feet from camera").
- Python: Core language for app logic.
- Streamlit: Web framework for the UI.
- Mediapipe: Pose estimation for landmark tracking.
- OpenCV: Webcam video capture and processing.
- gTTS: Text-to-speech for audio instructions.
- pydub: Audio processing and MP3 caching.
- FFmpeg: Backend for pydub audio operations.
- JavaScript: Audio playback via Streamlit components.
- NumPy: Coordinate and angle calculations.
- Math: Angle computations (atan2, degrees).
- Python 3.8+
- A webcam (built-in or external)
- FFmpeg installed and added to system PATH
- Git (for cloning the repository)
-
Clone the Repository:
git clone https://github.com/Pythonpreran/Posecheck-Pro.git cd Posecheck-Pro -
Install Python Dependencies:
pip install streamlit opencv-python mediapipe gTTS pydub
-
Install FFmpeg:
- Windows:
- Download FFmpeg from ffmpeg.org or a trusted source (e.g., gyan.dev).
- Extract the archive (e.g., to
C:\ffmpeg). - Add
C:\ffmpeg\binto your system PATH:- Right-click 'This PC' > Properties > Advanced system settings > Environment Variables.
- Edit 'Path' under System variables, add
C:\ffmpeg\bin, and click OK.
- Verify: Open Command Prompt and run
ffmpeg -version.
- macOS:
brew install ffmpeg
- Linux:
sudo apt-get install ffmpeg
- Windows:
-
Verify Setup:
- Ensure a webcam is connected.
- Check Python version:
python --version(should be 3.8+). - Confirm FFmpeg:
ffmpeg -version.
-
Run the App:
streamlit run main.py
-
Interact with the App:
- Open the provided URL (e.g.,
http://localhost:8501) in a browser. - In the sidebar:
- Select an exercise (Arm Raise or Squat).
- Set number of repetitions (1-20).
- Enter height (100-250 cm) and weight (30-200 kg).
- Click Start Exercise to begin.
- Follow calibration tips (good lighting, 3-6 feet from camera, full body visible).
- Watch the webcam feed for pose landmarks and listen to audio instructions.
- View real-time feedback and workout summary (reps, time, calories) upon completion.
- Open the provided URL (e.g.,
-
Reset or Stop:
- Click Reset Exercise in the sidebar to restart.
- Close the terminal to stop the app.
Posecheck-Pro/
├── main.py # Main Streamlit app
├── audio_cache/ # Directory for cached MP3 audio files (auto-generated)
├── README.md # This file
└── requirements.txt # Optional: List of dependencies (recommended)
- Webcam Not Found: Ensure a webcam is connected and accessible. Check
cv2.VideoCapture(0); try1or2if multiple cameras exist. - FFmpeg Error: Verify FFmpeg is in PATH (
ffmpeg -version). Reinstall if needed. - Mediapipe Warnings: Ensure frame dimensions are set (640x480 in code). Update Mediapipe if errors persist (
pip install --upgrade mediapipe). - Audio Not Playing: Check browser autoplay settings. Ensure
audio_cachedirectory is writable. - Performance Lag: Reduce webcam resolution or use a lower
model_complexityin Mediapipe (e.g., 0 instead of 1).
Contributions are welcome! To contribute:
- Fork the repository.
- Create a branch:
git checkout -b feature/your-feature. - Commit changes:
git commit -m "Add your feature". - Push to the branch:
git push origin feature/your-feature. - Open a pull request with a clear description.
Please follow the Code of Conduct and report issues via GitHub Issues.
This project is licensed under the MIT License. See LICENSE for details.
- Built for the hackathon Neural Nexus to explore health tech and AI.
- Inspired by the need for safe home workouts.
- Thanks to Mediapipe, Streamlit, and gTTS communities for amazing tools.
For questions or feedback, reach out via GitHub Issues or connect on LinkedIn.


