Scouting the Dodgers, One Frame at a Time
Building ReleaseFrame and BatSwingVision for the LA Dodgers: 500 hand-labelled pitches, a ResNet + GRU, and why I stopped trusting the loss curve.

In this case study↓
Relevant links
ReleaseFrame finds the moment the ball leaves a pitcher’s hand, then measures arm angle and slot at that frame. I built it for the LA Dodgers alongside BatSwingVision, a separate pipeline for following the bat, ball and hitter.
At a glance
- Client
- Los Angeles Dodgers
- Timeframe
- Oct 2025 – May 2026
- My role
- ML and full-stack engineering
- Models
- ResNet18 + BiGRU, YOLOv8, YOLOv8-pose, MediaPipe, ByteTrack
- Product
- FastAPI service and a Dodgers-branded React scouting dashboard
The problem
Release point is where a pitcher's mechanics show up most clearly, which is why scouts care about it. The usual way to find it is to scrub through a clip frame by frame and click. That works for one pitch. It doesn't work for a bullpen session, a whole game or a library of prospects.
"Roughly right" is no use here. If the model picks a frame three frames late, the arm has already followed through and the angle you measure belongs to a different moment. So I didn't want a classifier that says this clip contains a release. I wanted a model that points to the exact frame.
The product
The dashboard looks like a Dodgers tool: the LA mark, team blue, and separate Pitching and Batting modes. You upload one or more clips and run the analysis. The result comes back with the release frame marked and the shoulder, elbow and wrist joints drawn on it.
Every analysis is saved to that pitcher's profile, so a scout can compare the recorded measurements across outings. The dashboard shows those measurements alongside the source clips so a scout can inspect outliers.
Left: a pitcher profile with pitch count, average arm angle and slot. Right: the roster filtered by arm slot (over-the-top, high ¾, ¾, sidearm, submarine).
Building the dataset by hand
I labeled one release frame per clip. The local annotation file contains 501 video IDs. The trainer splits by video ID before creating windows, keeping overlapping frames from the same video on one side of the split. That protects against within-clip leakage. A separate split by pitcher or game would test generalization more directly.
How ReleaseFrame works
A single frame often can't tell you whether the ball is still in the hand, because motion blur and the glove hide too much. The sequence gives it away: the arm accelerating, the hand opening, the ball separating. So the model looks at frames first and then reads them in order.
The ReleaseFrame pipeline, from raw clip to arm slot.
Stop trusting the loss curve
At first I saved the checkpoint with the lowest validation loss, like you're taught to. But the lowest-loss model wasn't the one that picked the best frames. Binary cross-entropy scores many frame-level decisions. Scouting needs a single answer per clip. The trainer now averages probabilities where windows overlap and takes the highest-scoring frame across the clip.
The fix was boring and obvious in hindsight: measure what you actually care about.
So validation now runs on full videos and reports frame MAE, how many frames off each prediction is, plus the share of predictions within ±1, 2, 3 and 5 frames. The best checkpoint is chosen on that, not on loss.
- Class imbalance. Only one frame per clip is a release, so that class is weighted 8×. Without it the model learns that "never release" is a pretty good answer.
- EMA weights. I keep an exponential moving average of the weights, and validation uses whichever of the raw or EMA weights scores better.
- Augmentation. Horizontal flips (lefties exist) and colour jitter, so lighting and broadcast colour don't throw it off.
- Training. Warmup, cosine learning-rate decay and mixed precision on a Colab A100.
The other side of the plate: BatSwingVision
Hitting needed a different approach. A bat is thin, fast and usually blurred, and a per-frame detector loses it constantly. BatSwingVision treats a swing as objects moving through time:
The BatSwingVision pipeline. Each stage is its own module, so any one can be swapped out.
Left: a validation batch with player, bat and ball boxes. Right: the detector's F1 score at each confidence threshold, used to choose the cut-off.
In the dashboard, Batting mode has the same upload flow and is next on the roadmap to be wired up to this pipeline.
Challenges
- Broadcast footage is messy. Camera angles change, graphics cover the mound and replays cut in. Restricting detection to the field cleared out most of the noise.
- OCR on score bugs. Reading the pitcher's name from the broadcast graphic saves typing, but it's brittle, as "Oervish" shows. A roster lookup to fuzzy-match names is the next fix.
- Speed. Pose estimation runs on every frame, so the API processes clips one at a time and the dashboard tells you while it's working.
What the scouting workflow still needs
Frame error is meaningful alongside the frame rate and the footage mix. I would report it by camera angle and video source, and track missing pose estimates separately from release-frame misses. The pitching upload is integrated into the dashboard. The batting pipeline remains separate in the version described here.
Keep reading
View all
Teaching Security AI to Show Its Work
Building Signal with IBM: turning scattered cloud logs into incidents, with an AI assistant that checks citations against incident evidence.

An AI That Edits the Beat Instead of Describing It
DJ AI: a browser beat studio where the copilot works through typed actions and never hears your audio.

The Dentist Is the Training Loop
Designing a dental X-ray review workflow that captures clinician corrections for future model training.