https://github.com/chonyy/ML-auto-baseball-pitching-overlay Skip to content Sign up * Why GitHub? Features - + Code review + Project management + Integrations + Actions + Packages + Security + Team management + Hosting + Mobile + Customer stories - + Security - * Team * Enterprise * Explore + Explore GitHub - Learn & contribute + Topics + Collections + Trending + Learning Lab + Open source guides Connect with others + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing Plans - + Compare plans + Contact Sales + Nonprofit - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} chonyy / ML-auto-baseball-pitching-overlay * Watch 4 * Star 99 * Fork 12 [?][?] Automatic baseball pitching overlay in realtime 99 stars 12 forks Star Watch * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights master 3 branches 0 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/c] Use Git or checkout with SVN using the web URL. [gh repo clone chonyy] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @chonyy chonyy Update GIF ... 404fbfd Dec 25, 2020 Update GIF 404fbfd Git stats * 47 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time img Update GIF Dec 25, 2020 model/yolov4-tiny-baseball-416 Adding image registration Dec 15, 2020 src Adding test file Dec 25, 2020 test_scripts Adding image registration Dec 15, 2020 videos Fixing overlay opacity Dec 19, 2020 .gitignore Adding image registration Dec 15, 2020 .travis.yml Adding image registration Dec 15, 2020 README.md Update GIF Dec 25, 2020 pitching_overlay.py Adjust Dec 15, 2020 requirements.txt Adding image registration Dec 15, 2020 View code README.md [2_balls_sm] [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] [?] Overlaying pitch motion and trajectory automatically with machine learning! This project takes your baseball pitching clips and automatically generates 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 will apply some image registration techniques to deal with slight camera shift on each clip. I'm still trying to improve it! Feel free to follow this project, also check out the Todo list. The idea came from this incredible overlay. Getting Started These instructions will get you a copy of the project, and generates your own pitching overlay clip! Get a copy Get a copy of this project by simply running the git clone command. git clone https://github.com/chonyy/ML-auto-baseball-pitching-overlay.git Prerequisites Before running the project, we have to install all the dependencies from requirements.txt pip install -r requirements.txt Overlay! Last, run the project with your own clips! Try a sample python pitching_overlay.py Try with yout own clips Place your pitching videos in a folder, then specify the path in the CLI. python pitching_overlay.py --videos_folder "./videos/videos" Project Structure [structure] More Demo [3_balls] [4_balls] [?] Todo * [*] Implement image registration to deal with camera shift * [ ] Build a demo web app for people to use it in realtime on web * [ ] Enable custom parameter tuning * [ ] Improve the visual effect * [ ] Write a Medium post to explain the technical workflow * [ ] Draw a structure diagram About [?][?] Automatic baseball pitching overlay in realtime Topics baseball pitch machine-learning ai artificial-intelligence data-science sport Resources Readme Releases No releases published Packages 0 No packages published Languages * Python 100.0% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Help * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.