Inspiration
There are over 300 million badminton players looking to improve their game. There’s no way coaches can give personalized insights to so many people!
Our teammate Ishan is a top 20 ranked player in the nation and as a private coach to many, he knows how tedious it is to scrub through game footage to collect stats. The goal of Baddy Buddy is to automate this process so coaches and players like Ishan can focus on their game, not go insane!
What it does
Users can upload a video of their game to be processed. Baddy Buddy then analyzes the footage and provides various useful statistics for the player. For example, it provides a heatmap of where the player is on the court, which allows them to see where the opponent is moving them most often. There is also a graph of the different points on the court where the player lost the point by letting the birdie drop, which is a good way to see where their “weak corners” are.
In addition to these helpful graphs, there is also an AI analysis of weak points and improvement steps from Baddie Birdie, our mascot and coach. Baddie Birdie has access to all previously submitted games from the user and can provide highly curated feedback and improvement opportunities. It also has a chatbot page where users can ask any additional questions they have about their gameplay.
How we built it
We use a Flask backend to handle video upload and HTTP requests. Once the client uploads their game footage, we use pretrained models based on Keypoint RCNN for detecting both the players position and the court boundaries. Furthermore, we use a pretrained TrackNetV3 model (published by Kaohswing University) to get pixel coordinates of the birdie on each video frame.
In order to make useful insights on the game, we must map pixel coordinates of the birdie and player to real world coordinates. This is done using projective transformation based on the court boundaries that we previously detected. All of this data is then sent to the client as a json file.
We use Next.js and TailwindCSS to build the frontend, along with heatmap.js for the graphs. We then integrated Anthropic’s Claude 3.5 Sonnet to be our “Birdie Baddie” coach, accessing all of the player’s game data and answering any related questions.
Challenges we ran into
The models we used early on weren’t able to detect the birdie and players well enough. For example, a small white light in the background of the footage was often recognized as the birdie, and the actual birdie would be lost.
Moreover, it’s hard to get our model to work for amateur games where the camera is not properly aligned and with high image quality. We had some difficulties when we tried to use the models on our own games that we recorded.
Accomplishments that we're proud of
The fact that we stuck with and finished this app in 24 hours is something we’re all proud of. The night before, we thought about switching the project because we didn’t think we would make it in time, but we were fortunate to have completed so many of our ideas on time.
What we learned
In just 24 hours, we learned how to work effectively as a team, balancing responsibilities and writing hacky code to get the app finished. We learned how to use frameworks like OpenCV and Next.js, while also learning a bit about how object detection models work.
What's next for Baddy Buddy?
More stats! Keeping track of the point total would allow analysis of winning and losing streaks, allowing for more insights into the mental side of the player. We would also like to expand player detection to analyze form and footwork to give more detailed feedback about what they can do to improve their fundamentals. Further improvements could be associating a playstyle with the player based on their movement and the types of shots they play and giving suggestions specific to that playstyle.
We would also upgrade to bigger servers that handle video processing faster for many users. It takes way too long to run on our personal computers to be practical.
Built With
- flask
- google-colab
- next.js
- opencv
- python
- pytorch
- tailwindcss
- typescript
Log in or sign up for Devpost to join the conversation.