Skip to content

I used pose_hrnet_w48_384x288 pretrained on COCO dataset with 17 joints. The model works irrespective of the direction of the camera except from the back side. For PushUps I used the angle formed by the elbow, for Squats the angle formed by the knees was used and distance between nose and wrists was considered for chin ups.

Notifications You must be signed in to change notification settings

akshatkaush/exercise-count

Repository files navigation

Sample Video- https://www.youtube.com/watch?v=djHRAaRSIzs

This projects counts the repetitions of common exercises. Here I have provided support for pushups, chinups, squats, dumbellcurls and dumbell-side-lateral. It can also tell whether you are doing a complete rep or an incomplete repetition. It can be extended to other exercises as well and they can be auto detected by just noting the angles between different joints. The model is also scalable to multi person estimation.

Here I used pose_hrnet_w48_256*192 pretrained on COCO dataset with 17 joints. The model works irrespective of the direction of the camera except from the back side. The model works irrespective of the direction of the camera. For PushUps I used the angle formed by the elbow, for Squats the angle formed by the knees was used and distance between nose and wrists was considered for chin ups.

This works only with video

Run

For running the web application go to http://142.93.222.67/. 1-Choose the file for which you need to count the reps
2-Choose the type of exercise.
3-Enter the mailId on which you want to receive the final video.

The video takes some time to process, so wait for 5-10mins for the mail. Mail might get into spam so check it after 10mins. Video cannot be viewed on the browser, download the video from the link.

For test purposes you can download a sample video from google drive.


To run the application on local system, run start-count.py and give filename with type of exercise to be counted.(1 for pushUps, 2 for sitUps, 3 for chinUps). To run the application run start-count.py and give filename with type of exercise to be counted. 1-PushUps
2-SitUps
3-ChinUps
4-Dumbell Curl
5-Side Dumbell Lateral

For running the application you need to add the weights folder in the main directory which can be downloaded from google drive.


For eg. python main.py --filename test.mp4 --exercise_type 1

examples

Sample input video and weights for the pipeline can be found at

About

I used pose_hrnet_w48_384x288 pretrained on COCO dataset with 17 joints. The model works irrespective of the direction of the camera except from the back side. For PushUps I used the angle formed by the elbow, for Squats the angle formed by the knees was used and distance between nose and wrists was considered for chin ups.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published