← all repositories
chonyy/AI-basketball-analysis

An AI referee that tracks elbows and airballs

It automates the tedious work of counting made and missed shots while measuring your shooting form with pose estimation.

★1.3k stars Python Computer VisionDomain Apps
AI-basketball-analysis
Not currently ranked — collecting fresh signals.
star history

What it does

AI Basketball Analysis ingests video of a player shooting hoops and overlays object-detection results to classify each attempt as made, missed, or undetermined. It also runs OpenPose on the footage to extract elbow and knee angles, offering a skeletal breakdown of shooting mechanics. A bare-bones REST API accepts image POST requests and returns detection keypoints in JSON.

The interesting bit

The project is essentially domain-specific glue: it fuses a Faster R-CNN model—trained on the generic COCO dataset—with OpenPose body keypoints to reason about a very specific physical task. That combination turns generic “person and ball” detection into a specialized, if experimental, shot-form coach.

Key highlights

  • Uses Faster R-CNN (COCO-trained) for basketball detection and OpenPose for skeletal angle analysis.
  • Color-codes shot outcomes in the output video: green for makes, red for misses, purple for undetermined.
  • Exposes a single REST endpoint (/detection_json) that returns keypoint data for uploaded images.
  • Includes a Google Colab notebook (community-provided) for GPU-free experimentation.
  • Explicitly marked for noncommercial research use only due to OpenPose licensing.

Caveats

  • The project requires a local GPU with CUDA to run OpenPose efficiently; the hosted Heroku version is prone to TensorFlow timeouts.
  • The authors acknowledge the current pipeline needs work: planned transitions to YOLOv4 and SORT tracking suggest the existing tracker and detector are not yet optimized for speed or false-positive filtering.
  • License restrictions (OpenPose) limit usage to noncommercial research.

Verdict

Worth a look if you are building a sports-analytics prototype or teaching computer-vision concepts through a concrete domain. Skip it if you need a production-ready, commercial coaching tool or a model trained specifically on basketball data rather than generic COCO weights.

Frequently asked

What is chonyy/AI-basketball-analysis?
It automates the tedious work of counting made and missed shots while measuring your shooting form with pose estimation.
Is AI-basketball-analysis open source?
Yes — chonyy/AI-basketball-analysis is an open-source project tracked on heatdrop.
What language is AI-basketball-analysis written in?
chonyy/AI-basketball-analysis is primarily written in Python.
How popular is AI-basketball-analysis?
chonyy/AI-basketball-analysis has 1.3k stars on GitHub.
Where can I find AI-basketball-analysis?
chonyy/AI-basketball-analysis is on GitHub at https://github.com/chonyy/AI-basketball-analysis.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.