Automatically generates the overlay. The input pitching clip could be directly from your phone or camera. The release point will be automatically detected by the program. This system will trace the trajectory and align all the videos to generate the overlay.
Source code: https://github.com/chonyy/ML-aut...
Hi guys, I built a project that could take your baseball pitching clips and automatically generates the overlay.
The input pitching clip could be directly from your phone or camera. The release point will be automatically detected by the program. This system will trace the trajectory and align all the videos to generate the overlay.
A fine-tuned YOLOv4 model is used to get the location of the ball. Then, I implemented SORT tracking algorithm to keep track of each individual ball. Lastly, I have applied some image registration techniques to deal with slight camera shifts on each clip.
My next step is to build a web app on top of this project. The web app will have a user-friendly GUI for people who are not so familiar with programming to directly try it online! Feel free to follow this project. I should be able to finish it in the upcoming weeks!
This is very cool, I was thinking about something akin to this except with the raw Statcast data (to visualize both the strike-zone and the pitch arsenal with a minute delay, hilariously over a Twitter argument that Jaime Barria actually has one of the best sliders in the game that nobody knows about, which I stand by). Any chance to integrate the data (raw through the api from MLB or the processed and almost-live data from Brooksbaseball/Fangraphs/Baseballsavant) for analysis on major league games perhaps? It's hard for even a lot of hardcore fans to truly put the finer aspects of spin-rate, movement, and how that affects advanced metrics like xwOBA for the pitcher, but by being able to visualize a pitch sequencing it would really allow it to make sense to far more people. Good stuff!
Hi @jim_zhou , thanks for your appreciation.
Unfortunately, I think I don't have enough baseball-related knowledge to work on the idea you proposed. However, I could tell you that this project could definitely work in realtime even without a decent GPU machine.
@jim_zhou@chonyy Yeah, I took a look at your code base and it's definitely something that has integration potential. I don't work for a team or anything but as someone who legally gambles on baseball there's a fair bit of value as to determining in close to real time not just what the last pitch was meant to be/was called but also, what the next pitch would be as a response to the last call, and to have a visualized version of that solves at least the issue where I'm absolutely clueless at UX/UI design in presenting information. Much appreciate the open source nature of the code and although there's some COVID-related unknowns with how the season is going to go, this could be something really useful. Much obliged!
Hey @chonyy I'd love to talk to you about the product but I'm a ProductHunt noob and don't know how to get your contact info. Is there somewhere I can reach you?
Automatic Baseball Pitching Overlay
Automatic Baseball Pitching Overlay
Attench
Automatic Baseball Pitching Overlay