Chapter 8 · 25 pages · Part: Video and Pose
Seeing Movement: Video and Pose Estimation
The app drew a skeleton over my video. How far is each dot from the real joint, and which of the numbers can I act on?
Read online PDF 5.8 MB Notebook + data 310 kB Markdown
Learning objectives
- Explain frame rate, shutter and resolution, and choose them for a task.
- Tell the stored frame rate of a clip from the rate it was filmed at, and correct every time and speed for the difference.
- Explain what a pose model returns and what its confidence does and does not mean.
- Run a pose model on a clip in Python, put the keypoints in a table and draw the skeleton.
- Set a scale from pixels to meters and state its error.
- Name the four levels of error between a real joint and a reported number, and sort results into three levels of trust.
Apps
Hip dropRange of motionCanvasJump
Sections
- 8.1A Video Is a Table
- 8.2Filming for Measurement
- 8.3From Pixels to Keypoints
- 8.4Pose Estimation in Python
- 8.5In the Browser
- 8.6Scale: From Pixels to Meters
- 8.7Cleaning Keypoints
- 8.8How Good Is the Number? Four Levels of Error
- 8.9Three Levels of Trust
- 8.10Is This Video Good Enough?
- 8.11Measure Anything
- 8.12Build Step B-8: Your Own Overlay
- 8.13Telling the Athlete
- 8.14Summary
- 8.15Exercises
Lecture slides
Two decks for this chapter, one for each class of the week. Each has a speaker script; text CC BY 4.0.
A Video Is a Table
Class 15, sections 8.1–8.8 · 30 slides · about 36.5 min
Which Numbers Can I Act On?
Class 16, sections 8.9–8.15 · 26 slides · about 33.5 min
Tutorials
From a raw file to an action, with every step runnable in the browser. Case studies are also printed in Part V.
- CS-10 Pose estimation, frame by frame case study, 60 min
- CS-11 From keypoints to a knee angle over a stride case study, 60 min
- Q-22 Detect a person in one image quick tutorial, 15 min
- Q-23 Read a video frame by frame and save every tenth frame quick tutorial, 15 min
- Q-24 Seventeen keypoints for one frame, as a table quick tutorial, 15 min
Code listings
- Listing 8.1 Read the stored frame rate of each example clip (`code/clip_headers.py`). code/clip_headers.py
- Listing 8.2 Keypoints of every frame into a table (`code/pose_table.py`). code/pose_table.py
- Listing 8.3 The left knee angle in every frame from two models (`code/knee_series.py`, shortened). code/knee_series.py
- Listing 8.4 Frame number from time, and the skeleton drawing (`code/b8-overlay/overlay.js`, shortened). code/b8-overlay/overlay.js
The listings and their data are in the notebook download above.
Exercises
24 exercises; 8 are CORE. Answers to selected exercises are at the back of the book.
Concept check
- 8.1 CORE Foundation, 2 min
A phone films a sprint start in slow motion at 240 fps and saves it as a 30 fps file. The file plays for 4.0 s. How long did the filmed action take in real life? Options: 32 s4.0 s0.50 s1.0 s - 8.2 CORE Foundation, 2 min
A pose model returns a confidence of 0.97 for a runner's right ankle. What does that tell you? Options: The model rates the point as clearly visible and well placed, but the point may still be on the wrong spot or the… - 8.3 Foundation, 2 min
From one side-view phone video of a runner, filmed square at the correct capture rate, which result belongs to the most trusted level? Options: Stride length in meters, scaled from the runner's stature.Pelvic drop in… - 8.4 Core, 3 min
A coach lays a meter stick on the ground to set the scale, but the stick lies 1 m nearer the camera than the athlete's running line. The camera is 6 m from the running line. The app's stride lengths will be Options:…
Hand calculation
- 8.5 CORE Foundation, 8 min
A runner's foot is on the ground for 7 frames of a clip filmed and stored at 60 fps. parts What is the contact time? 0.117 s. If each end of the contact can be one frame off, how large is a one-frame error in… - 8.6 Core, 10 min
A jump is filmed in slow motion at 240 fps and stored at 30 fps. The athlete is in the air for 132 frames. parts What flight time does a program that uses the header rate report? 4.40 s. What is the real flight time?… - 8.7 Extension, 12 min
A swimmer is filmed from a balcony above the pool, the camera looking straight down at the water. Two neighboring lane lines on the bottom, whose centers are 2.5 m apart, appear 180 px apart in the frame. parts What is… - 8.8 Extension, 12 min
Two rules set a scale from stature (Section 8.6): the apps' rule, which takes the nose-to-ankle span as 0.888 of stature, and the full-stature rule an earlier version of the Running app used. A 1.70 m athlete's…
App lab
- 8.9 CORE Core, 25 min
Your own range of motion. Use the Range of motion app (https://apopt.com/rom/), Basic mode, knee protocol, on yourself. steps Set the phone on a tripod at knee height, about 3 m away, square to your side, with your… - 8.10 Extension, 30 min
Default model against YOLO. Film yourself (side view, whole body, a few squats or strides, 5 to 10 seconds, note the capture rate) and load the clip into the canvas app (https://apopt.com/canvas/). parts Analyze with…
Python analysis
- 8.11 CORE Foundation, 20 min
Run Listing 8.2 on form3_30fps.mp4 with yolo26n-pose.pt, then with yolo26s-pose.pt. parts How many frames have a person for each model? 117 and 115. Using your CSVs, compute the left knee's included angle in every frame… - 8.12 Core, 25 min
Reproduce Figure 8.4 for jump1_120fps.mp4. parts For each of YOLO26n and YOLO26s, count the frames with no person and the frames where the left ankle's confidence is below 0.3. n: 54 and 1; s: 60 and 4. Replot with the… - 8.13 Extension, 40 min
Specify, generate, verify. You will ask an AI assistant for a function real_duration(k1, k2, stored_fps, capture_fps) that returns the real time between frames k1 and k2. parts Before asking, write the specification and… - 8.23 Core, 60 min, case-file data
Case file: take two running clips of the same athlete from the case files at apopt.com/data/athletes, one filmed from the side and one from behind. Run Listing 8.2 on both, then check the model against your own eyes on…
Body science
- 8.14 Foundation, 5 min
The pose model's “knee” keypoint is not the knee's center of rotation. Give two anatomical reasons, and say which kind of measure (an angle in the side view, or a few-degree tilt in the front view) is hurt more by the… - 8.15 Core, 8 min
Define the sagittal, frontal and transverse planes of the body in one sentence each. For each, name one movement in your sport that happens mostly in that plane, and say where you would put a single camera to film it.
Science of the sport
- 8.16 Foundation, 5 min
Choose a sport you know. Name two markings or objects on its field, court or pool with a known size that you could use to set a scale, give their size with a source, and say whether each lies in the plane of the… - 8.17 Extension, 8 min
A pitched ball leaves the hand at about 40 m/s. A runner's step at 180 steps per minute lasts 0.333 s. parts How far does the ball travel between two frames at 30 fps and at 240 fps? 1.33 m and 0.167 m. How many frames…
Field collection
- 8.18 CORE Foundation, 30 min
A known angle, square and off square. Equipment: phone, tripod, printed protractor (large, at least 15 cm), tape, a partner. steps Consent: your partner gives written consent to be filmed (Appendix E; under 18, a parent… - 8.19 Core, 30 min
Scale with distance. Equipment: phone, tripod, tape measure, a meter stick. steps Fix the phone on a tripod. Mark three distances from the lens along the floor: 2 m, 4 m, 6 m. Stand the stick upright, square to the…
Build
- 8.20 CORE Core, 75 min
Build step B-8: play, step and overlay. Add a page to your app that loads a video and a keypoint CSV (the output of Listing 8.2), steps through the video one frame at a time, and draws the keypoints and skeleton over…
Communicate
- 8.21 CORE Foundation, 20 min
An athlete's parent, who has signed the consent form (Appendix E), will film a 14-year-old's jump at home and send it to you for the Jump app; the athlete has given their own assent. Write the text message you would… - 8.24 Core, 25 min, case-file data
Case file: using the two clips of the previous exercise, write a one-page “Is this video good enough?” report for the athlete's coach. For each clip, go through the five checks of Section 8.10; for each of the four…
Check the AI
- 8.22 Core, 8 min
An AI assistant was given an app's results file for a runner and wrote: “The pose model reported a mean keypoint confidence of 0.98, so your stride length of 1.62 m is accurate to about 2%, roughly 3 cm.” Find the flaw…
How to cite
Hedengren, J. (Ed.) (2027). Chapter 8: Seeing Movement: Video and Pose Estimation. In Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data (pp. 211–235). IRSRI Sports Research Institute. https://apopt.com/book/pdf/08-seeing-movement.pdf
BibTeX
@incollection{hedengren2027ch8pose,
editor = {Hedengren, John},
title = {Chapter 8: Seeing Movement: Video and Pose Estimation},
booktitle = {Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data},
chapter = {8},
pages = {211--235},
publisher = {IRSRI Sports Research Institute},
year = {2027},
note = {CC BY 4.0},
url = {https://apopt.com/book/pdf/08-seeing-movement.pdf}
}
RIS
TY - CHAP ED - Hedengren, John TI - Chapter 8: Seeing Movement: Video and Pose Estimation T2 - Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data SP - 211 EP - 235 PB - IRSRI Sports Research Institute PY - 2027 N1 - CC BY 4.0 UR - https://apopt.com/book/pdf/08-seeing-movement.pdf ER -