Sub topic 1
What a Pose Is: Keypoints, Skeletons and the COCO Layout
Prerequisites
This chapter assumes basic Python and NumPy, familiarity with convolutional neural networks, and a basic understanding of object detection and bounding boxes. It also assumes you know that a model can learn from labelled examples by minimizing a training loss.
Keypoints and skeletons
Human pose estimation represents a person with a set of keypoints. A keypoint is a named location on the body, such as the left elbow or the nose. In a 2D image, each keypoint usually has image coordinates (x, y) and a confidence score.
A skeleton is a graph that connects related keypoints. The points are the graph's nodes, and the body connections are its edges. For example, the shoulder connects to the elbow, and the elbow connects to the wrist. The skeleton describes body structure without filling in the person's entire silhouette.
A model may predict several people in one image. Each person then has a separate set of keypoints and a separate skeleton. Coordinates normally use the image's pixel space, with the origin at the top-left. The x-coordinate increases to the right, and the y-coordinate increases downward.
The COCO 17-keypoint layout
The COCO human-pose dataset uses 17 standard keypoints. COCO annotations also include visibility information, which indicates whether a point is visible, hidden by another object, or not labelled in the image.
| Index | Keypoint | Typical connections |
|---|---|---|
| 0 | Nose | Left eye, right eye |
| 1–2 | Left eye, right eye | Nose, ears |
| 3–4 | Left ear, right ear | Corresponding eye |
| 5–6 | Left shoulder, right shoulder | Elbows, hips |
| 7–8 | Left elbow, right elbow | Shoulders, wrists |
| 9–10 | Left wrist, right wrist | Corresponding elbows |
| 11–12 | Left hip, right hip | Shoulders, knees |
| 13–14 | Left knee, right knee | Corresponding hips, ankles |
| 15–16 | Left ankle, right ankle | Corresponding knees |
The left and right labels refer to the person's body, not the viewer's left and right. If a person faces the camera, their left shoulder can appear on the right side of the image. This convention is a frequent source of implementation errors.
A skeleton is not always a complete anatomical model. It is a chosen set of connections used by the dataset and model. Different datasets can use different points, names, ordering, and edges.
Reading a pose prediction
A prediction can be represented as an array with shape (17, 2) for coordinates and an array with shape (17,) for confidence scores. Row 5, for example, corresponds to the left shoulder under the COCO ordering.
A confidence score measures how strongly the model supports a keypoint location. It is not a guarantee that the point is correct. A visible wrist can have low confidence because of blur, while an occluded point can have a deceptively high score because the surrounding body pattern is familiar.
Exercise
An output contains 17 points, each with x and y coordinates. What additional information is needed to interpret point 7 correctly under the COCO layout?
Show answer
You need the COCO keypoint ordering and the coordinate convention. Point 7 is the right elbow in the zero-based COCO order, and the coordinates must be interpreted in the image's pixel coordinate system.