EJ Lawless
AI Projects / BasketballGraph

BasketballGraph

The model found the basketball zero times in 150 frames.

Visit basketballgraph.com ↗

This started as a dad question: my son plays youth basketball, and I wanted to know — from film, not vibes — whether he was actually spacing the floor or whether his defender was parked in the lane all game. Answering it meant building a computer-vision pipeline: detect every player, track them across frames, pick out one specific kid on three different teams, and turn it into heat maps anchored to real game events.

Zero for 150

The first wall was the ball. Stock YOLO — the standard off-the-shelf detector — found the basketball zero times in 150 frames, labeling the region “person” or, memorably, “suitcase.” The instinct is to blame the model. The actual diagnosis was resolution: at the 720p I was feeding it, a basketball is a smear; at the iPhone's native 4K, the same model finds it fine.

That unlocked the useful trick. Asking a vision-language model to locate the ball from scratch fails — boxes land on walls. Asking it to confirm a proposed box works reliably. So the pipeline mines 4K frames, proposes candidates cheaply, confirms each with a cascade of Claude vision models, and fine-tunes a small detector on the confirmed set. Propose-then-confirm took shot-window recall from 44% to 94%. Two spare Mac minis on the home network ran the detection jobs as a tiny cluster.

From film review to curriculum

basketballgraph.com — the live dashboard with topics mastered, XP, streaks, and the Daily 5

The site that grew out of this, basketballgraph.com, teaches the game the way Math Academy teaches math: a 48-topic knowledge graph wired with 75 prerequisite edges, from “what is a foul?” to designing a college practice plan. Topics unlock only when their prerequisites are mastered, and everything comes back on a spaced-repetition ladder — 1, 3, 7, 14, 30, 60, 120 days.

My favorite piece is the Daily 5: five questions, identical for every player on earth, chosen deterministically from the date — Wordle's trick, no server coordination required. Streaks bank Duolingo-style freezes. There's also a Unity prototype that drills the one skill film can't: the floor freezes while you read the defense, runs when you commit, and a debrief compares your read to the coach's.