Squash Review
Phone footage of a squash match in, a positional match review out.
Squash Review turns ordinary phone video of a squash match into a post-match review. It tracks both players onto a to-scale model of the court, computes positional stats such as time on the T, court coverage and pressure, and has a language model turn those into a few coaching notes — each one citing the stat behind it.

How it works
- 01
Court homography maps points, not pixels. You tap court landmarks on one frame, and each player's foot position (the midpoint of the ankle keypoints) becomes metres on the court. The image is never warped: only the floor is flat, so standing players would come out skewed.
- 02
Code does the counting; the model only interprets. A deterministic stats engine writes a compact stat sheet in named zones and human units, with handedness applied in code. The model never sees per-frame data and must cite a stat for every claim, so a bad insight traces to bad data or bad reasoning.
- 03
Tracking with a fixed cast of two: exactly two players on a known court is a two-target assignment problem, matched frame by frame with the Hungarian algorithm. When the players overlap it records a gap rather than guessing, and identity is anchored to your own tap on yourself.
- 04
Rally structure from sound plus position: ball strikes pulled from the soundtrack mark where rallies start and end, fused with the tracks for each rally's length, shot count and where each player stood at the deciding shot.
- 05
The vision worker pulls jobs from a Postgres queue, claims them atomically, sends heartbeats, and needs no inbound ports; a scheduled task reclaims jobs from workers that go quiet. The video is deleted once processed.
Built with
- Next.js 16
- TypeScript
- Supabase
- Cloudflare R2
- Python
- YOLO11 pose
- OpenCV
- React Native / Expo
Status
Runs end to end on real footage — upload, tracking, report — validated on one venue and camera so far. An iOS client is written but not yet tried on a device.
Worth knowing
- Calibrating from the back corners plus the short-line ends measured about 0.14 m of position error, against a 0.5 m target; the four corners alone gave about 0.96 m.
- Moving the worker from a CPU box to a consumer GPU made processing about 8.5× faster.


