Everyframe · computer vision
Deciding what a motion is.
A pose-driven reader that watches a golfer and says putt or full swing from the skeleton alone, before the motion is over. It reads three distances on the body and never a speed, so a slowed-down clip reads exactly like a real-time one.
The verdict, live
A putt and a full swing as the engine returns them: the skeleton burned on, READING while the motion is open, then the verdict from the exact frame the reader became sure. Under each, the probability of a full swing as it accumulated over the clip.
p(full swing) as the motion unfolds · decision marked
p(full swing) as the motion unfolds · decision marked
The decision frame is the first frame the running probability settled on the verdict the clip ends with. A full swing is decided the moment the running probability clears 90%, usually while the hands are still going up. A putt is decided once the hands have come back from their farthest point with the probability still under 10%: the stroke reversed and the hands never went up. When a motion stops before either happens, the verdict lands at its end, and the table says so.
Every clip on one chart
Each point is one clip: how far the hands rose against how much the shoulder line turned, coloured by the reader's probability. Hollow points are putts, filled points full swings, by the label a person gave them. The clips are numbers only; no footage from this set is shown.
| Clip | View | Rise | Crown | Turn | p(full) | Verdict | Decided |
|---|
What it reads
Three distances on the body, each divided by the torso length so the camera distance cancels. None of them is a speed, which is what lets a slow-motion clip and a real-time clip land on the same point.
Rise
How far the hands climb above where they rested at address. A putt keeps this near zero; a full swing sends the hands more than a torso length up.
Crown
Whether the hands ever pass the shoulder line, and by how much. Negative for a putt, positive for a full swing. This is the number that decides early: it turns positive on the way up.
Turn
How much the shoulder line foreshortens or opens in the image as the chest turns. Face-on it narrows, down the line it widens; either way a putt barely moves it.
The model
A logistic model on the three features, fitted on the labelled clips. Accuracy is reported leave-one-out, never on the training fit: each clip is scored by a model that never saw it. Weights and the count are read from the data: – .
The pipeline
The same three stages as the tempo showcase. Perception and the render run inside the Everyframe engine; the reading is a few lines of geometry on the extracted joints.
Perceive Everyframe
Person detection, top-down pose, one skeleton record per frame through
sink_pose_jsonl
. Nothing changed from the tempo showcase.
// examples/ai/golf_extract_pose.rs (unchanged)
let poses = estimate_pose_detections(&v, persons, "rtmpose-m", …)?;
sink_pose_jsonl("pose.jsonl", poses); // one line per frameRead signal processing
Find the motion, read three distances as they accumulate, run the logistic model each frame. The decision frame falls out of the running probability.
# golf_stroke.py
episode = sustained hand movement with the largest reach
rise = max(height) - height at rest # torso lengths
crown = max(height - shoulder height)
turn = max |shoulder width - width at rest| / width at rest
p = sigmoid(w · standardise([rise, crown, turn]) + b)
decided = first frame p >= 0.9, or hands back from farthest with p <= 0.1,
or the end of the motionRender Everyframe
Back in the engine: the skeleton on the original frames, READING gated until the decision frame, the verdict gated from it. The reader's output is what times the labels.
// examples/ai/golf_verdict_label.rs
v = v.try_pipe(draw_skeleton_with(poses, …))?
.pipe(drawtext(label("READING", between(t, start, decided))))
.pipe(drawtext(label("PUTT 97%", between(t, decided, end))));What it does not do
The page states what the reader measured and nothing past it.
Stroke type, not strike quality
Nothing in a skeleton says how well the ball was hit. Ball speed, launch and contact are not measured here and are not claimed.
Two classes today
Chips and pitches sit between a putt and a full swing on every feature. They are not a class yet, so the reader calls them by whichever side they fall on, with a lower confidence.
No club, no ball
The pose model has 17 body joints and none for a club. A putter held like a wedge is read by the body's motion, not by the club in the hands.
A small set
The model is fitted on a few dozen clips from two camera views. The chart shows every one, misses included, and the accuracy is leave-one-out so it is not the training fit.