# Pose keypoints (COCO-17)

The apps and the book's pose files use the 17 COCO keypoints, in this order:

| # | name | # | name |
|---|---|---|---|
| 0 | nose | 9 | left wrist |
| 1 | left eye | 10 | right wrist |
| 2 | right eye | 11 | left hip |
| 3 | left ear | 12 | right hip |
| 4 | right ear | 13 | left knee |
| 5 | left shoulder | 14 | right knee |
| 6 | right shoulder | 15 | left ankle |
| 7 | left elbow | 16 | right ankle |
| 8 | right elbow | | |

"Left" means the athlete's left, not the left of the image.

## Pose CSV layout

One row per video frame:

- `frame`: frame number from 0.
- `<point>_x`, `<point>_y`: pixel position, origin at the top-left of the image, y increasing **downward**.
- `<point>_c`: the model's confidence for that point, 0 to 1. Points below about 0.3 are usually guesses.

Point names are shortened: `l_` and `r_` for left and right, for example `l_ankle_x`.

To turn frames into seconds, divide by the capture frame rate (not the file's frame rate if the clip was slow motion). To turn pixels into metres, use a known length in the image (the athlete's height or a marked distance) and remember the scale only holds in the plane facing the camera.

Example files: `book/ch08-pose/` (the same clip through five model sizes), `book/ch09-gait/`.
