Skip to content
NewA realistic 3D head for a free swim cap editor
Nov 9, 2026·5 MIN READ
The camera knew where the turn was, the skeleton did not

The camera knew where the turn was, the skeleton did not

First day of a swim video analyzer for Vimo Swim: an off-the-shelf pose model missed half the strokes, and the two most reliable signals came from the camera pan and the stopwatch burned into the frame.

I wanted to know whether a swimmer holds a steady tempo, from video alone: split each length into preparation, glide, underwater kicks, swimming and turn, and time every hand entry. Vimo Swim sets a tempo; this would measure the tempo a swimmer really swam. One day in, the pipeline runs end to end on a 65 second underwater clip, and the most useful lesson has nothing to do with the pose model.

What the pose model gave me

I started with a stock YOLO pose model, 17 body points per frame, no training on swimmers. On a screen recording of the clip it found the swimmer in 42% of frames. On the full quality file that jumped to 90%, so the source quality was the first floor. The skeletons it returns under water are still rough: it swaps left and right, puts a second "person" box on the hips, and sees about every second stroke. The clip should have about 60 hand entries; the detector found 36. Any tempo number built on that is noise, and the first "median gap 0.65 s" I quoted was exactly that: two wrists crossing the surface together on a garbage skeleton.

Two signals that did not depend on the skeleton

flowchart LR
    V[Video frames] --> P["Pose model<br/>17 points, noisy"]
    V --> C["Camera pan<br/>phase correlation on the pool floor"]
    V --> S["Stopwatch overlay<br/>read by eye"]
    P --> F["Features in torso units<br/>wrist depth, head depth, kick"]
    C --> T["Turns = pan sign flips<br/>Prep = camera still"]
    S --> X["Time axis check"]
    F --> R[Phases and hand entries]
    T --> R

The camera pan. The footage follows the swimmer, so the pool floor slides through the lower half of the frame. Phase correlation between consecutive frames gives that shift in one line of OpenCV. Its sign is the swim direction, and a sign flip is a turn. When the camera stands still and the swimmer does not move, that is the preparation at the wall before the push-off. Neither needs a single correct body point. I skip the upper half of the frame because the stopwatch overlay there is static and would pin the shift to zero.

The stopwatch in the picture. The clip has a timer burned into the frame. At video time 15.0 s it reads 00:11.77. The video starts 3.2 seconds before the push-off, which is the preparation phase I was looking for, and it corrected my own mistake: I had taken "turn at 13.8 s" from the stopwatch as video time and spent an hour wondering why the pan flipped at 17.0 s. It flipped exactly where the swimmer turned.

Every signal here is relative to the swimmer or to the frame, never an absolute pixel position. A following camera makes absolute positions meaningless.

What the water surface really is

Under water the surface is not an edge, it is a mirror. The swimmer's reflection hangs above him and the real surface is the symmetry axis between the two. A brightness edge detector locked onto the timer overlay instead. The working estimate fuses three cues per frame: the midpoint between the swimmer box and his reflection box when the detector sees both, the row of best mirror symmetry inside the swimmer's x range, and a rule that the hips stay under water.

Where the numbers stand

SignalSourceResult on the clip
Preparationcamera still, swimmer still0 to 2.90 s, true push-off about 3.2 s
Turnscamera pan sign flip4 lengths, starts at 2.9, 18.5, 34.4, 47.6 s
Glide vs kickankle oscillation, threshold 0.22glide 0.12 to 0.18, dolphin kicks 0.3 to 0.46
Hand entrieswrist crossing the waterline36 found, about 60 expected
Tempoclean gaps only (0.5 to 0.95 s)0.65 s per hand entry, between 0.57 and 0.71

The viewer is one HTML file: video on top, charts below with a cursor that follows playback, the lap and the hand entry gaps on the left. Video: Effortless Swimming.

The tempo estimate comes from 11 clean gaps. That is enough to set a Vimo at 0.65 s per beat for this swimmer and not enough to say whether he holds it. For that I need every entry of at least two lengths, so the viewer got a label mode: step frames, press E at each hand entry, X saves the file, and an eval command scores the detector against my eyes.

Read whatever the video already tells you before trusting a model. The overlay stopwatch cost nothing and caught the one assumption that would have sent the whole phase model off by three seconds.

It took a day to get here, and most of that day went into the rules, not the model. Next time I would reach for the camera cues on the first morning, label two lengths before tuning any threshold, and plan the pose fine-tuning from the start, because every other number waits for it.

Share
Mariusz Smenżyk
Written by

Mariusz Smenżyk

Builder for sport. Make. Test. Launch.

Related notes