apopt.comCBE 493R Data-Driven Athletics

Course / Tutorials / Week 8 / Q-24

Quick tutorial Q-24 · Week 8 · about 15 min · Foundation

Seventeen keypoints for one frame, as a table

Open a pose model's keypoint table, turn one frame's row into 17 rows of x, y and confidence, and draw it as a stick figure.

  1. 1Gather
  2. 2Statistics (used)
  3. 3Visualize (used)
  4. 4Cleanse
  5. 5Features
  6. 6Balance
  7. 7Scale
  8. 8Split
  9. 9Deploy
  1. Ask
  2. Collect
  3. Check (this week)
  4. Interpret
  5. Coach
  6. Reassess

Every cell runs in this page; the first run downloads Python (about 30 s). Nothing you load leaves your browser. Helpful first: Q-23 Read a video frame by frame and save every tenth frame.

The decision

A pose model hands you a table of numbers for every frame. Before building a knee angle or a cadence on it, read one row and decide which of its 17 points you can trust.

The raw data

Try it

A pose model turns each frame of a video into one row of numbers: the frame number, an x and a y in pixels for each of 17 keypoints, and the model's confidence in each. The file here is the one Chapter 8 builds from its running example, a hand-drawn runner animated and seen from the side (form3_30fps.mp4, 117 frames), with the smallest YOLO26 pose model. Everything in this tutorial runs in the page.

PythonOpen the keypoint table

Type a prediction to enable Run.

Show the expected result without running
(117, 52) (rows = frames with a person, columns)
first columns: ['frame', 'nose_x', 'nose_y', 'l_eye_x', 'l_eye_y']
last columns:  ['r_knee_c', 'l_ankle_c', 'r_ankle_c']

117 rows and 52 columns: 1 + 17 × 2 + 17. A row this wide is hard to read. Turn one row into a short table of its own, one line per keypoint. Frame 30 is the one Chapter 8 (Section 8.4) draws on the video, because something goes wrong in it.

PythonOne frame as 17 rows

Type a prediction to enable Run.

Show the expected result without running
                 x        y  confidence
r_ear       463.34   584.76        0.01
r_eye       446.96   579.65        0.30
r_wrist     393.16   635.68        0.42
r_elbow     380.95   678.24        0.66
r_ankle     611.46  1258.12        0.91
l_ankle     515.10  1242.29        0.94
nose        450.78   593.65        0.96
r_shoulder  428.41   657.09        0.98
r_knee      460.09  1108.42        0.98
l_shoulder  571.56   661.54        0.99
l_wrist     750.55   854.32        0.99
l_eye       465.65   581.34        0.99
l_elbow     717.36   716.30        1.00
l_hip       519.57   950.71        1.00
r_hip       453.70   957.56        1.00
l_knee      375.88  1070.72        1.00
l_ear       518.96   587.23        1.00
below 0.5: 3 of 17

The least sure points are all on the runner's right side, the side away from the camera: the right ear, eye and wrist. Those are hidden behind the head and body, and the model says so. The hips, knees and ankles score 0.91 or more.

Draw the row

Join the points into a stick figure. Image y grows downward, so the axis is turned over. Bones with an end below 0.5 are drawn faint and dashed.

PythonThe frame as a stick figure, from the table alone

Show the expected result without runningStick figure of frame 30 drawn from the 17 keypoints, left side solid and right side dashed, with the low-confidence right arm faint; each point is labelled with its confidence.

The table says the legs are certain. The drawing on the video says otherwise: in this frame the nano model put both ankles mid-shin and the right knee in the thigh (Chapter 8, Section 8.4), while the next size up (s) followed the legs to the feet. Nothing in the confidence column warns you. A confidence is the model's own score, not a check that the point is right; the only checks are looking at the skeleton on the video and comparing two models, which CS-10 does.

For the athlete: before trusting a knee angle from a clip, look at the skeleton drawn on the frame it came from.

Action card

Action card
Finding
In frame 30 the model is sure of the legs (0.91 or more) and unsure of the far-side ear, eye and wrist.
Evidence
Three of 17 points are below 0.5, all on the side away from the camera.
How sure
The confidence column alone cannot tell you the legs are placed wrongly in this frame; the video can.
Action
Check the skeleton on the video at the frames you will measure.
Test again
Compare with a second model size (CS-10) whenever a number matters.

With your own data

Build the same table from your own clip with the local cells of CS-10, then run this page's cells on it, choosing a frame where your foot is on the ground.

Check yourself

  1. How many columns does one row of a 17-keypoint table hold, with the frame number?

    columns

  2. The right wrist has confidence 0.42 in a side view of a runner facing left. Why?

0 of 2 answered · 0 right the first time

The same method in another field

A wide table with one row per time step and repeated groups of columns is the shape of most sensor logs: several thermocouples, each with a value and a status flag. Turning one row into a short table is the first look at any of them.

Acknowledgements

The keypoint table is from Chapter 8 of Data-Driven Athletics, made with Ultralytics YOLO26 (AGPL-3.0).

References

Built 2026-11-30 with Python packages numpy 2.5.5, pandas 3.1.1, matplotlib 3.11.2. In the browser the same code runs on Pyodide, so the last digit can differ.