HoopMetrics

HoopMetrics

My shooting dashboard. Every shot tracked, judged and charted from footage shot by a Raspberry Pi in a gym bag.

A three-pointer being tracked, with the
         shot's measurements drawn on
What the tracker sees: the ball mid-flight, both players tracked, and every measurement the make/miss call rests on.

What it is

A dashboard for my own shooting. A small camera - a Raspberry Pi - films from inside my gym bag while I shoot. The video uploads to Amazon S3, and software on my computer watches every frame, finds the ball, finds me, works out where I was standing, and decides whether the shot went in.

What comes out is this page: how I shot from each distance, a map of where my shots came from, and short clips of the best runs.

Why it wasn't simple

The camera has to stay hidden, so it films from about waist height at the side of the court. That is a bad angle for this. Anything far away looks flat and squashed together, and from there a shot that drops through the net looks almost the same as one that hits the rim and falls beside it.

Ordinary object-detection software can find a basketball and find a person. It cannot tell you whether the shot went in - not from here.

So I built my own layer on top of it. It measures the shot rather than looking at it - how centred the ball was when it reached the rim, how fast it was falling, how far sideways it drifted afterwards, how quickly it dropped out below the net - and learns from shots I labelled myself which combinations of those actually mean the ball went in. Everything is measured against the size of the ball, so the same rules work whether the camera is close or far away.

Lifetime

Sessions
1
Shots
188

77 made

Overall
41%

field goal

3-pointers
35%

28 of 79

2-pointers
44%

43 of 98

Points
182
Best run
4

made in a row

Sessions