Skip to content

🏆 GeeseHacks Winner - Full-stack soccer shot analysis platform to improve kicking form using Ultralytics YOLOv8 and MediaPipe

Notifications You must be signed in to change notification settings

gordonzhang1/SoccerMetrics

Repository files navigation


SoccerMetrics

AI soccer shot analysis platform to improve kicking form
View Demo »

About The Project

Logo

SoccerMetrics lets you upload a video of you kicking a soccer ball, analyzes the video, and gives you a score and feedback on your kick based on the optimal form

What it does, and how we built it

The platform provides players and coaches with actionable insights by analyzing biomechanics and comparing them to optimal standards. It identifies critical moments in gameplay—such as ball contact or specific movements—and evaluates joint angles, body posture, and overall technique. These measurements are compared to predefined optimal angles for peak performance. A custom scoring algorithm calculates a performance score for each movement, offering a clear metric for improvement and progress tracking.

The platform uses MediaPipe GHUM 3D to extract precise 3D pose landmarks, allowing us to calculate joint angles and other biomechanical metrics. For each movement, joint angles are compared against a database of optimal angles derived from professional player data and biomechanical studies. Deviations from these optimal angles are quantified and factored into a custom scoring algorithm, which evaluates performance based on accuracy, consistency, and technique.

It also uses Ultralytics YOLOv8 for ball detection. Critical gameplay moments, such as ball contact, are identified using Pandas, and visualizations of angles and trajectories are annotated in real-time with OpenCV. Personalized feedback, based on the performance score, is generated using LangChain and the OpenAI API, ensuring that players receive detailed recommendations tailored to their unique needs.

The scoring and feedback system operates seamlessly within a robust infrastructure powered by Docker for containerization, Kubernetes for scalability, and Google Cloud Platform for hosting. This architecture ensures the platform is both reliable and adaptable to various training scenarios.

Built With

  • React
  • TypeScript
  • Python
  • Flask
  • Pandas
  • OpenCV
  • MediaPipe
  • OpenAI API
  • TailwindCSS

Deployed With

  • Google Cloud
  • Docker
  • Kubernetes
  • Vercel

(back to top)

Features

  • Real-Time Ball Detection: Utilizes Ultralytics YOLOv8 for precise and efficient ball tracking during gameplay.
  • 3D Pose Landmark Extraction: Employs MediaPipe GHUM 3D to analyze player movements and extract biomechanical data.
  • Biomechanical Metrics and Angle Calculations: Measures joint angles, body posture, and movement patterns to assess technical performance.
  • Optimal Angle Comparison: Benchmarks player movements against predefined optimal angles derived from professional standards.
  • Custom Scoring Algorithm: Calculates a performance score based on accuracy, deviation from optimal angles, and consistency.
  • Personalized AI Feedback: Integrates OpenAI API to deliver tailored coaching tips and improvement suggestions.
And more to come!

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

About

🏆 GeeseHacks Winner - Full-stack soccer shot analysis platform to improve kicking form using Ultralytics YOLOv8 and MediaPipe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •