AI-powered fitness assistant for real-time pose estimation, exercise counting, and workout feedback.
AI-powered fitness assistant for real-time pose estimation, exercise counting, and workout feedback.
exercise_counters.py, improved counting accuracy, and cleaned up the code structure.data/exercises.json, so custom exercise types can be added or edited without changing code.build_portable.ps1 for reproducible Windows portable builds.Good-GYM-Portable.zip on GitHub Releases.Clone and install
git clone https://github.com/yo-WASSUP/Good-GYM.git
cd Good-GYM
# Create a virtual environment
python -m venv venv
# Activate on Windows
.\venv\Scripts\activate
# Or on Mac/Linux
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtRun the application
python run.pyGPU is generally not recommended. The RTMPose model in this project is small, and real-time webcam usage also includes image capture, resizing, skeleton drawing, and UI refresh. CUDA data transfer and scheduling overhead may make GPU inference slower than CPU inference. GPU mode is mainly useful for your own testing and comparison.
Prerequisites: NVIDIA GPU + NVIDIA driver installed
Resource usage:
# 1. Replace onnxruntime with the GPU version
pip uninstall onnxruntime
pip install onnxruntime-gpu
# 2. Install CUDA runtime libraries through pip (no manual CUDA Toolkit install required)
pip install nvidia-cudnn-cu12 nvidia-cublas-cu12 nvidia-cuda-runtime-cu12 nvidia-cufft-cu12 nvidia-curand-cu12 nvidia-cusolver-cu12 nvidia-cusparse-cu12 nvidia-cuda-nvrtc-cu12The application uses CPU by default. When CUDA is detected, the "GPU Acceleration" switch in the control panel becomes available, but it is not enabled automatically.
Note: The packaged EXE version only supports CPU mode. GPU acceleration is only available when running from source.
All exercise types are stored in data/exercises.json. You can easily add, edit, or remove exercise types without changing code.
…Configuration parameters
down_angle: Angle threshold when lowering (degrees)up_angle: Angle threshold when raising (degrees)keypoints.left: Three left-side keypoint indices [pt1, pt2, pt3] used to calculate angleskeypoints.right: Three right-side keypoint indices [pt1, pt2, pt3] used to calculate anglesis_leg_exercise: Whether this is a leg exercise (true/false), which affects counting logicangle_point: Keypoint indices [pt1, pt2, pt3] used to draw angle lines on the videoExample: add a new exercise
"my_custom_exercise": {
"name_zh": "我的自定义运动",
"name_en": "My Custom Exercise",
"down_angle": 120,
"up_angle": 170,
"keypoints": {
"left": [5, 7, 9],
"right": [6, 8, 10]
},
"is_leg_exercise": false,
"angle_point": [6, 8, 10]
}Restart the application
Contributions are welcome. Feel free to submit a Pull Request.
Thanks to the RTMPose open-source pose detection model: https://github.com/Tau-J/rtmlib
This project is licensed under the MIT License. See the LICENSE file for details.
No open issues yet, or sync has not completed.