Welcome to GymJam, a cutting-edge web application designed to enhance your fitness journey and help you achieve your fitness goals. It is your comprehensive companion, providing a diverse range of exercises tailored to target different body parts. With an intuitive user interface and a library of exercise variations, an immersive fitness experience that caters to users of all levels.
-
Backend Framework: python >= 3.9, flask, mediapipe
- Other Software Dependencies: Package managers (e.g. pip), version control system (e.g. Git)
-
Client-Side:
- Operating System: Windows, macOS, or Linux
- Web Browser: Google Chrome, Mozilla Firefox, Safari, Microsoft Edge, or equivalent
- Browser Plugins: JavaScript enabled, support for HTML5 and CSS3
- Internet Connectivity: Broadband or high-speed internet connection
-
Clone the repository:
https://github.com/Sovik-Ghosh/GymJam-AI-assistant-using-mediapipe.git
-
Navigate to the project directory:
cd backend
-
Create a virtual environment:
python3 -m venv my_env
-
Activate the virtual environment:
source my_env/bin/activate
-
Install dependencies (if any) and set up your development environment.
pip3 -r requirements.txt
MediaPipe is an open-source framework developed by Google that provides a comprehensive solution for building machine learning (ML) pipelines to process multimedia data, including video, audio, and image streams. It is designed to facilitate the development of real-time perception and processing pipelines, particularly for tasks related to computer vision and media processing.
-
Go to backend directory
-
Activate the virtual environment:
source my_env/bin/activate
-
Run the code:
python app.py
-
Copy and paste anyone of the url in a browser.
- Left Bicep Curl:
http://localhost:5000/video_feed_left
- Right Bicep Curl:
http://localhost:5000/video_feed_right
- Pushup:
http://localhost:5000/video_feed_pushup
- Squat:
http://localhost:5000/video_feed_squat
- Left Bicep Curl:
-
Observe and follow the instructions on the browser for the correct form of exercise.
Feel free to customize the project to implement your strategies and behaviors for extending exercise variations.
You can modify the existing controllers or create new ones.
- PoseModule.py is the base file containing different functions for calculating angle, tracking position, capturing video feed.
- app.py uses flask to render captured webcame frames to webpage
- pose_left.py calculates and corrects left arm bicep curl
- pose_right.py calculates and corrects right arm bicep curl
- pose_pushup.py calculates and corrects pushup using coordinates from the left side
- pose_squat.py calculates and corrects squat using coordinates from the left side
Additionally, you can explore advanced features provided by Mediapipe.
If you would like to contribute to this project, please follow our contribution guidelines. We welcome bug reports, feature requests, and pull requests.
This project is licensed under the Apache License 2.0.