Skip to content

JasonYapzx/sportform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

SportForm

Logo

SportForm

Sportform offers AI-assisted Form Analysis that uses Computer Vision and Pose Estimation to evaluate videos uploaded by users.
Explore the docs »

View Video Demo · Try Demo deployed on Vercel · Report Bug

Frontend

Inspiration

Covid-19 has presented society with many challenges, some of which include how education can be conducted in a socially-distanced world. Sportform was created to provide a solution to this challenge, primarily in physical education, by allowing technology to assist educators in providing the level of instruction required of them while embracing digital alternatives to physical classes. Sportform addresses key concerns of online physical education classes using web-conferencing, such that lack of accountability and supervision by using AI-powered tools to augment educators.

What it does

Sportform is a Multimedia Forum-based Web Application for users to upload and review fitness videos with a keen focus on improving one's form and competency in their respective exercises/sports. Sportform offers AI-assisted Form Analysis that uses Computer Vision and Pose Estimation to evaluate videos uploaded by users.

(back to top)

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

  • React
  • Firebase
  • Tailwind
  • NextJS
  • Python
  • OpenCV

(back to top)

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

(back to top)

Installation

Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.

  1. Clone the repo
    git clone [email protected]:JasonYapzx/sportform.git
  2. cd to sportformfe and install NPM packages
    cd sportformfe
    npm install
  3. Get your Firebase config and store it in an .env.local file in the root directory of the project. For example this should be how your .env file looks like:
    NEXT_PUBLIC_FIREBASE_API_KEY={your_api_key}
    NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN={your_auth_domain}
    NEXT_PUBLIC_FIREBASE_PROJECT_ID={your_project_id}
    NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET={your_storage_bucket}
    NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID={your_messaging_sender_id}
    NEXT_PUBLIC_FIREBASE_APP_ID={your_app_id}
    NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID={your_measurement_id}
  4. If you want to try our a dev deployment just run npm run dev to start this NextJS application.
  5. If you need to build for production, just run npm run build to build a production ready application.

(back to top)

Pose Estimation

SportForm generates annotations on user-uploaded videos, providing counts of successful repetitions for various exercises and checking the form of those exercises. It achieves this by utilizing a state-of-the-art object detection and pose estimation model, YOLOv8l-pose, developed by ultralytics.This model accurately detects and generates 17 keypoints on the human body, including joints and facial features like ears.


Repetition Counter



Form Checker

SportForm takes in video uploads from users and utilizes the model to generate the coordinates of keypoints. By analyzing these keypoints, we calculate the necessary angles and distances to accurately evaluate exercise form and count repetitions.

In the future, there is a possibility of training deep neural networks for differnet catagories of exercises to accurately determine repetition count and evaluate form. However, at present, this endeavor is beyond our scope as it requires significant time and resources.

(back to top)

Prerequisites

The implementation of our pose estimation scripts are in a Python>=3.7 environment with PyTorch>=1.7 (ensure CUDA is enabled).

Other requirements will be installed together with YOLO by ultralytics, refer to their documentation for more information.

pip install ultralytics

(back to top)

Usage

CLI

Our script to generate video with annotations can be used from the Command Line Interface (CLI).

  1. Enter the directory /path/to/sportform/pose_estimation

    cd /path/to/sportform/pose_estimation
  2. Try video generation with our example for pushups

    python3 pushup_keypts.py -s=./pushup.mp4
  3. Try video generation with our example for situps

    python3 situp_keypts.py -s=./situp.mp4

The output video will be generated in the same directory with _kpt appended to the video name.

(back to top)

Roadmap

We hope to enhance the application further by adding a social media forum page whereby users can critique and comment on other's forms and help one another to improve. Another way where by people can learn from one another is to have a specialized video share feature for everyone to stay connected and work out with one another virtually. This creates a cohesive space for virtual workouts!

(back to top)

Contact

Jeric Lew - Linkedin | Github

Eiffel Leo - LinkedIn | Github

Javon Teo - LinkedIn | Github

Jason Yap - Linkedin | Github

Project Link: GitHub

(back to top)

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors