DEV Community

Cover image for Sport With AI
Furkan Gulsen
Furkan Gulsen

Posted on

4 2

Sport With AI

Github Repo: https://github.com/Furkan-Gulsen/Sport-With-AI

The human body is detected with the help of the Mediapipe library. Then, using the mathematical methods applied, it is determined how much the exercise count is done.

Sit-Up Exercise

Sit-Up

Video: https://www.youtube.com/watch?v=aQh52cRfH-w

The sit-up is an abdominal endurance training exercise to strengthen, tighten and tone the abdominal muscles. It is similar to a crunch, but sit-ups have a fuller range of motion and condition additional muscles.

python main.py -t sit-up -vs videos/sit-up.mp4
Enter fullscreen mode Exit fullscreen mode

Pull-Up Exercise

Pull-Up

Video: https://www.youtube.com/watch?v=8hkTMATEuUc

A pull-up is an upper-body strength exercise. The pull-up is a closed-chain movement where the body is suspended by the hands and pulls up. As this happens, the elbows flex and the shoulders adduct and extend to bring the elbows to the torso.

python main.py -t pull-up -vs videos/pull-up.mp4
Enter fullscreen mode Exit fullscreen mode

Push-Up Exercise

Push-Up

Video: https://www.youtube.com/watch?v=IGjHIXAZAak

A push-up is a common calisthenics exercise beginning from the prone position. By raising and lowering the body using the arms, push-ups exercise the pectoral muscles, triceps, and anterior deltoids, with ancillary benefits to the rest of the deltoids, serratus anterior, coracobrachialis and the midsection as a whole.

python main.py -t push-up -vs videos/push-up.mp4
Enter fullscreen mode Exit fullscreen mode

Squat Exercise

Squat

Video: https://www.youtube.com/watch?v=iQrXRTk7KE0

A squat is a strength exercise in which the trainee lowers their hips from a standing position and then stands back up. During the descent of a squat, the hip and knee joints flex while the ankle joint dorsiflexes; conversely the hip and knee joints extend and the ankle joint plantarflexes when standing up.

python main.py -t squat -vs videos/squat.mp4
Enter fullscreen mode Exit fullscreen mode

Walking Exercise

Walking

Video: https://www.youtube.com/watch?v=pPTeSd_GXoc

python main.py -t walk -vs videos/walk.mp4
Enter fullscreen mode Exit fullscreen mode

If you want to detect your movements live with your webcam, you can run the code line below.

python main.py -t sit-up
# or python main.py -t pull-up
# or python main.py -t push-up
# or python main.py -t squat
# or python main.py -t walk
Enter fullscreen mode Exit fullscreen mode

Image of Bright Data

Maintain Seamless Data Collection – No more rotating IPs or server bans.

Avoid detection with our dynamic IP solutions. Perfect for continuous data scraping without interruptions.

Avoid Detection

Top comments (2)

Collapse
 
aaronj profile image
Aaron Johnson

This is honestly pretty cool , hats off to ya

Collapse
 
furkangulsen profile image
Furkan Gulsen

Thank you so much 🙏

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay