This page is being translated by your browser

Translation can break parts of Roboflow. If something stops working, turn translation off and reload the page.

Detection · Sports Analytics

Basketball detection: Datasets & Models

Detect basketballs in images and video frames using an object detection model. Useful for tracking ball position, possession, and shot events in game footage.

Basketball detection example
1M+
developers
16k
organizations
50B
inferences

Basketball detection

This detection workflow takes images or video frames from games, practices, or broadcast feeds and returns bounding box coordinates for the basketball in each frame. Built on a basketball dataset of court imagery, it identifies the ball across fast motion, motion blur, occlusion, and varied gym and arena lighting so you can track ball position, possession, and shot events downstream.

Try it out

Powered by general detection model

Run on custom image

Drop an image here or click to upload

Detecting classes:

Why automate basketball detection

Manually annotating ball position across thousands of frames of game footage is slow, tedious, and impossible to scale across a full season of sports analytics. Automating basketball detection lets analysts, coaches, and product teams extract ball trajectories, dwell times, and shot events automatically, turning raw video into structured data. This removes the bottleneck of frame-by-frame review and enables consistent measurement across every game and camera angle. The result is faster turnaround on scouting reports, highlight generation, and performance metrics.

Key benefits

You get consistent, frame-accurate ball localization that plugs into existing tracking and event-detection pipelines without manual labeling. The workflow runs against footage from standard broadcast cameras, sideline cameras, or overhead rigs, so no new hardware is required. Because it is model-based, it scales from a single scrimmage clip to full-season archives while maintaining the same detection logic.

How to use it

  1. Upload an image: Drop any photo into the widget above to try basketball detection for free, right on this page.
  2. Preview instant results: The model detects basketball, hoop, backboard, player, referee within seconds and returns an annotated image with structured predictions, so you can immediately see how well it works. Adjust the detection classes and re-run until the results fit your scenario.
  3. Like what you see?: With a free Roboflow account, you can deploy this workflow with the Serverless Cloud API, customize it in your workspace, or train RF-DETR on your own images for production accuracy.
  4. Get started for free: No code or training data required to begin: upload, review the results, and make it part of your stack in a single click.
Recommended model

Recommended model for basketball detection

RF-DETR is state of the art for real-time object detection, instance segmentation, and keypoint detection, with higher accuracy and lower latency than comparable models, and it's Apache 2.0 licensed. When you're ready to build a production model for basketball detection, fine-tune it on your own labeled images, then deploy to a Serverless Cloud API endpoint.

Train your own model
Roboflow Agent

Not sure where to start?

Describe your Basketball Detection project to Roboflow Agent.

Agent