Inspiration

This project started from a very personal frustration. I wanted to learn how to play tennis so I could play with my girlfriend, but I quickly realized that learning proper technique without a coach is extremely difficult. Watching tutorial videos online helps a little, but it's hard to understand what you're doing wrong in your own swing.

That made me think: what if an AI could watch your tennis swing and give you feedback instantly, just like a real coach?

With the recent advances in computer vision and generative AI, it seemed possible to build a system that analyzes human motion from video and turns that analysis into understandable coaching advice. That idea became the starting point for Tennis Coach.


What it does

Tennis Coach is an AI-powered tennis training assistant that analyzes swing videos and generates personalized coaching feedback.

Users can upload a short tennis video, and the system will:

  • Detect body pose and motion using computer vision
  • Extract swing metrics from the motion sequence
  • Evaluate the quality of the movement
  • Generate structured coaching feedback using AI

Instead of generic tutorials, the system gives personalized feedback based on your actual swing.

This allows beginners to understand what they are doing wrong and how to improve.


How we built it

The system combines computer vision, motion analysis, and generative AI.

Backend

  • FastAPI for building the API service
  • MediaPipe Pose for real-time human pose detection
  • OpenCV for video decoding and frame processing
  • Motion analysis logic to compute swing metrics
  • Amazon Nova AI to generate coaching-style feedback

The backend processes uploaded videos frame-by-frame, extracts pose landmarks, computes motion metrics, and then sends the structured data to an AI model to generate actionable coaching advice.

Frontend

  • React + TypeScript
  • Video upload interface
  • Analysis visualization
  • AI-generated coaching feedback display

The UI allows users to upload a video and immediately see the analysis results and coaching suggestions.


Challenges we ran into

One of the biggest challenges was ensuring stable pose detection from real-world videos. Computer vision models are highly sensitive to camera angle, lighting, and whether the full body is visible in the frame. Many test videos initially failed pose tracking.

Another challenge was turning raw pose landmarks into meaningful sports metrics. MediaPipe provides body keypoints, but converting those into useful indicators like swing timing, body rotation, and arm extension required careful design.

Finally, integrating AI-generated feedback in a way that feels clear, specific, and helpful required multiple iterations of prompt design and structured outputs.


What we learned

Through this project we learned:

  • How to build an end-to-end AI-powered motion analysis system
  • How computer vision can be applied to sports training and movement analysis
  • How to integrate LLMs with structured computer vision outputs
  • How frontend and backend systems work together to create interactive AI applications

Future improvements

There are many exciting directions for future development:

  • Real-time swing analysis using a webcam
  • Support for more tennis strokes (serve, backhand, volley)
  • Pose visualization with skeleton overlays
  • AI-generated personalized training plans
  • Mobile app integration for on-court coaching

The long-term vision is to make sports coaching more accessible by turning AI into a personal coach anyone can use anytime, anywhere.

Built With

Share this project:

Updates