Menu

1 / 2

I built an open-source basketball highlight pipeline here's how I improved vertical framing from 49% to 94%

DEV Community: opensource·Colin·7 days ago
#4UBaWXtS
#devtoopensource#devto#dev#basketball#photo
Reading 0:00
15s threshold

I'm a Toronto Raptors fan, and one thing that's always bothered me about basketball highlights on TikTok, Reels and Shorts is how often the crop loses the action. The ball goes toward the basket, but the video ends up showing empty floor, the crowd or a player on the bench.

I wanted to see whether I could do better.

I recently added basketball support to Clips Kitty , my free, open-source Python application for turning long videos into short-form clips. The new basketball pipeline is available in version 2.1.

Demo: https://youtu.be/g1dMqrq-YaI

Source code: https://github.com/ColinGPT9/clips-studio

The problem with cropping basketball broadcasts

A standard basketball broadcast is 16:9, while a full-height vertical video is 9:16. You lose a large portion of the original frame, and the important objects are constantly moving: the ball, the players and the rim.

My first version used the generic COCO YOLOv8n model to detect the basketball.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.