This project is about counting curls and making sure elbows are tucked in using YOLOv7 for pose estimation. I'm using OpenCV and YOLOv7 to detect the human body parts and then estimate the angle between each three points using the dot product.
Angles | Points |
---|---|
Left: arm: [6, 8, 10] elbow: [12, 6, 8] |
|
Right: arm: [5, 7, 9] elbow: [11, 5, 7] |
- Clone the project repository from GitHub.
- Install the necessary packages in
requirements.txt
.
git clone https://github.com/moaaztaha/GYM-assistant-using-Yolov7-pose-estimation
cd GYM-assistant-using-Yolov7-pose-estimation
pip install -r requirements.txt
python gym_helper.py -h
usage: GYM Helper [-h] [-mp MODEL_PATH] [-min ANGLE_MAX] [-max ANGLE_MIN] [-thr THRESHOLD]
Counting curls and making sure elbows are tucked in.
optional arguments:
-h, --help show this help message and exit
general:
-mp MODEL_PATH, --model_path MODEL_PATH
path to model .pt file
finetune:
-min ANGLE_MAX, --angle_max ANGLE_MAX
angel at which a curl is completed
-max ANGLE_MIN, --angle_min ANGLE_MIN
angel at which a curl is started
-thr THRESHOLD, --threshold THRESHOLD
the maximum for elbow angle from body
Thanks for using my app.