Skip to main content
Back to Canvas
Project2026Open Source ContributorPythonGradioOpen SourceComputer VisionLocalization

Contributing a Bilingual WebUI to an AI Badminton Hawk-Eye System

Open-source contribution adding a browser-based Gradio interface, court auto-detection, and a video pipeline orchestration layer to a 623-star badminton analysis project.

Good-Badminton is an AI hawk-eye system for badminton — court detection, shuttle tracking, rally analysis — but it only ran from the command line. I contributed a full browser-based interface so non-technical users could run it without touching a terminal.

WebUI layer

Built with Gradio Blocks, the interface covers the whole workflow: upload a match video, auto-detect the court (with manual correction if the detector gets it wrong), configure analysis options, and download the annotated output. Bilingual support (zh/en) throughout, since the project's user base is split across both languages.

Pipeline orchestration

The original codebase was built around a CLI script, so the WebUI needed an orchestration module sitting between the interface and the core analysis engine. It handles resolution scaling and H.264 re-encoding so uploaded videos in inconsistent formats don't break downstream processing, plus output cleanup so temp files don't pile up between runs.

Preserving CLI compatibility

The core analysis system wasn't written with a UI in mind — it assumed a terminal and stdout. I extended it with headless detection helpers and an optional progress callback, so the WebUI could report progress without the core logic knowing it was being driven by anything other than a script. That kept the existing CLI path fully working; the WebUI is additive, not a fork.

The PR was reviewed and merged by the maintainer in 2026.