Sub topic 11
Single-Stage Pose Models
What “single-stage” means
Assume you know basic Python and NumPy, convolutional neural networks, bounding boxes, and supervised training losses.
A single-stage pose model predicts a person’s bounding box and keypoints in one network pass. It does not first run a separate person detector and then send each detected crop to a pose estimator.
This differs from a top-down pipeline:
- A detector finds people.
- A pose model estimates keypoints inside each person box.
A single-stage model combines these steps. It predicts person instances and their keypoints from the full image. The grouping problem is therefore handled by the model itself.
Model structure
A typical model has three main parts:
- A backbone, which extracts visual features from the image.
- A neck, which combines features at different resolutions.
- A pose head, which predicts detections and keypoints.
For each candidate location, the pose head can predict:
- Bounding-box coordinates.
- Person or object confidence.
- Class confidence, if several classes are supported.
- Keypoint coordinates.
- A confidence value for each keypoint.
Some models use predefined anchor boxes. Others use an anchor-free design, where a grid location represents the center of a detected person. YOLO-style pose models are common examples of single-stage systems.
How predictions become poses
The model may predict coordinates relative to a grid cell, bounding box, or input-image size. The inference code converts these values to pixel coordinates.
Predictions with low person confidence are removed. When several predictions describe the same person, non-maximum suppression (NMS) keeps the strongest box and removes overlapping alternatives. Keypoints belonging to a removed box disappear with that instance.
A simplified filtering operation looks like this:
import numpy as np
def keep_person_poses(boxes, keypoints, person_scores, threshold=0.5):
"""Filter detections while keeping each detection's keypoints aligned."""
keep = person_scores >= threshold
return boxes[keep], keypoints[keep], person_scores[keep]
boxes = np.array([[10, 20, 100, 220], [12, 18, 102, 218]])
keypoints = np.zeros((2, 17, 2), dtype=np.float32)
scores = np.array([0.91, 0.31])
boxes, keypoints, scores = keep_person_poses(
boxes, keypoints, scores
)
print(len(scores)) # 1Trade-offs and failure modes
Single-stage models are attractive when latency matters. They process an image once, support multiple people naturally, and usually have simpler deployment than a detector plus pose estimator.
Their main trade-off is shared capacity. The same features must locate people and estimate precise joints. Small joints, unusual poses, heavy occlusion, and crowded scenes can reduce accuracy. A top-down system can spend more computation on each detected person and may produce more precise keypoints.
| Choice | Strength | Common weakness |
|---|---|---|
| Single-stage | Fast and simple for many people | Less precise in crowded or small-person scenes |
| Top-down | Strong per-person keypoint accuracy | Runtime grows with the number of detected people |
| Bottom-up | Efficient when many people overlap | Grouping joints into individuals is difficult |
Use a single-stage model when predictable latency and easy multi-person inference matter more than maximum per-joint accuracy. Check performance separately for crowded scenes, small people, and partially hidden limbs.
Exercise
Why can a single-stage model be faster than a top-down pipeline?
Show answer
It predicts person boxes and keypoints in one shared network pass instead of running a separate pose model for every detected person.