How an NBA-trained basketball detector held up on unseen Finals broadcasts and what was needed to turn detections into a vertical crop

I tested E-BARD’s YOLOv8n detector on footage outside its training games and integrated it into Clips Kitty, an open-source application that turns basketball broadcasts into vertical highlights.

The test used 256 frames from last season’s NBA Finals highlights, labelled by Claude vision agents. The ball was visible in 172 of those frames.

At 960 px, the detector found the ball in 86% of the ball-visible frames under a presence-based check at confidence 0.10. This isn’t the same as the model card’s 0.566 recall: my check asks whether any detection lands near the labelled ball, whereas the card uses a stricter overlap threshold on its own test split.

The raw output still contains many false positives. At confidence 0.10, E-BARD produces about 1.65 false-ball detections per frame in this test, often in the stands. The pipeline therefore filters candidates using size, shape and position, compensates for camera movement with phase correlation, links plausible ball detections into tracks and plans the crop for each shot.

On the rendered vertical clips, the ball was inside the crop in 162/172 frames (94%), versus 85/172 (49%) in the first version. The rim was in frame as the ball arrived in 46/47 moments (98%), versus 20/47 (43%).

The biggest remaining limitation is the change in camera distance. A closer team-network broadcast produced only 54% ball detection at 960 px in a small check; at 640 px it reached 80% on the same 35 labelled balls. The test is also limited to one broadcaster and a small number of Finals clips.

Code: GitHub - ColinGPT9/clips-studio: Clips Kitty: Free open-source AI video clipper. Local Opus Clip alternative (also Klap & Vizard) that turns Twitch, Kick & YouTube streams into auto-captioned Shorts, Reels, and TikToks, and can auto-post them 24/7 from a mini PC. Local AI (Ollama, Whisper): no usage or subscription fees. Or OpenRouter: a 2-hour VOD cost 11 cents in my testing. · GitHub

E-BARD: GitHub - GabrieleGiudic/E-BARD: E-BARD: A Multi-Task Extension of the Basketball Action Recognition Dataset for Player Detection, Team Attribution and Jersey Number Recognition official repository · GitHub

The model is used unmodified under CC BY 4.0. The app’s code is AGPL-3.0.

One variable could be hiding inside the distance result: the detector never sees camera distance — it sees the ball at a size in pixels at the input, and recall tends to track that size against the sizes it trained on. Your two tests change broadcaster and ball size together: at 960 px the closer broadcast’s larger ball may sit above the detector’s comfortable band, and downscaling to 640 could be moving it back into that band rather than fixing distance as such.

The check that separates them: re-run both sets at several input sizes (1280 / 960 / 640 / 480) and score recall in bins of the labelled ball’s diameter at each size. If scale is doing the work, both broadcasts collapse onto roughly one recall-by-diameter curve; if they stay apart at matched diameters, distance or broadcast style really is the driver.

You already have the labels and the pipeline, so this could be settled with no new footage — and if scale wins, the fix is an input-size choice per broadcast, which is free.

Thank you I am going to look at it later. I am looking at the cuts being off centred right now and trying to fix that.