Hand Keypoint Detection: How It Works and What It Means in Practice

Hand landmarks explained: the 21 keypoints, how MediaPipe and YOLO pose pipelines produce them, and why in-cabin use needs slice-based robustness tests.

Hand Keypoint Detection: How It Works and What It Means in Practice
Written by TechnoLynx Published on 11 Jul 2026

Hand landmarks are the 21 keypoints a hand model places on a hand from a single frame. Downstream code measures angles, distances and gestures from that skeleton. MediaPipe produces them in two stages: a palm detector, then a landmark model that runs on the cropped hand. YOLO-style pose models predict the box and the keypoints in a single network. Hand pose models normally perform well on imagery from controlled settings, but that does not tell you how one behaves when a hand is half hidden behind a steering wheel at night. Published robustness studies point to occlusion, poor illumination and motion blur as the main reasons hand pose models degrade. In a body-pose study on in-car images, networks were overconfident and could not tell when a keypoint was absent.

What Are Hand Landmarks, and What Do the Standard 21 Hand Keypoints Represent?

The 21 hand landmarks are the wrist plus four points along each of the five digits. On the fingers those are the knuckle at the base (MCP), the two finger joints (PIP and DIP) and the fingertip. On the thumb they are the CMC joint near the wrist, the MCP joint, the IP joint and the tip. MediaPipe describes its output as 21 3D hand-knuckle coordinates. The same 21-point convention runs through research and training data: the XPose low-light dataset labels 21 keypoints per hand, and the Ultralytics Hand Keypoints dataset stores 21 per hand as (x, y, visibility) triplets.

MediaPipe’s landmark model learns a consistent internal hand pose and still places points on partially visible hands. They also do not matter equally. A metamorphic-testing study of hand pose models found that hiding different keypoints caused different amounts of degradation, and that the damage did not rise steadily with the number of hidden points. That has a practical consequence. An occlusion test that only counts how many points are covered will miss which points matter for your gesture or reach logic.

How a MediaPipe Hand Landmarker Gets from a Detected Palm to Coordinates

MediaPipe hand landmarks come out of a pipeline of cooperating models, not one network. In video mode the sequence runs like this:

  1. A palm detection model scans the full image and returns an oriented hand bounding box. (The trade-off of rotated boxes is covered in our piece on when an oriented bounding box earns its cost.)
  2. A hand landmark model runs on the cropped region and regresses the 21 3D coordinates directly, without predicting heatmaps.
  3. The landmark model also outputs a hand presence score. In video and live-stream modes, a score below the configured threshold makes the Hand Landmarker re-run palm detection. Otherwise a lightweight tracker places the hand for the next frame.
  4. The task returns landmarks in image coordinates, landmarks in world coordinates and handedness for each detected hand.

There are two separate thresholds: a minimum detection confidence for the palm model and a minimum hand presence confidence for the landmark model. According to Google’s guide, the landmark model was trained on about 30K real-world images plus rendered synthetic hands composited onto varied backgrounds. The original MediaPipe Hands paper (Zhang et al., 2020) presents the pipeline as real-time, on-device hand tracking from a single RGB camera for AR/VR.

That design point matters for a vehicle. A 2024 study on gesture-driven patient positioning notes that MediaPipe hand is designed for hands within about a metre of the camera and does not work well when hands appear small, as they do from a ceiling camera.

How Is Hand Landmark Detection Different from Hand Detection and General Keypoint Detection?

Hand detection answers where is a hand (a box or a mask). Hand landmark localisation answers where is each joint, mapping image features to the coordinates that describe the pose. HandyNet is an in-cabin example of the first kind. Built on Mask R-CNN, it detects, segments and localises driver hands in 3D from depth images, and its supervised outputs are instance masks for each hand, not finger joints. How those region-based detectors work is covered in our explainer on R-CNN object detection in automotive perception.

General-purpose keypoint detection is broader again. Ultralytics’ own definition says keypoints can represent joints, landmarks or other distinctive features of an object. Body pose keypoints sit on the major joints and the head, with points on the hands as optional extras. YOLOv7 Pose, for example, is trained on COCO’s 17-landmark body topology. A body topology of that kind carries no finger joints, so finger-level questions need a hand-specific model or dataset. For the body-level view, our page on COCO pose keypoint estimation for driver-facing systems covers that topology.

Hands are also hard to detect in specific ways. They have numerous degrees of freedom and are subject to occlusions and self-similarity.

What Does a Hand Landmark Model Output, and How Should Downstream Logic Use It?

MediaPipe returns, for each hand, a list of 21 landmarks with x, y and z. The x and y values are normalised to [0.0, 1.0] by image width and height. The z value is depth relative to the wrist, with smaller values closer to the camera. The current Hand Landmarker adds world-coordinate landmarks and a left/right handedness label. Ultralytics pose models represent keypoints as [x, y] or [x, y, visible] and usually return a confidence score for each point. In heatmap-based detectors, a keypoint’s position is the heatmap maximum, and a minimum confidence threshold on that maximum separates predictions from noise.

Output What it actually is How we would gate on it
Normalised x, y Position as a fraction of frame width and height Convert using the true input frame size, and account for any crop or letterbox before measuring distances
Relative z Depth relative to the wrist, not distance from the camera Use for finger curl and ordering, never as reach distance to a control
World coordinates A 3D estimate returned by the task Validate against ground truth from your own rig before any reach or zone logic depends on it
Handedness A left/right label for each detected hand Check it under your actual camera mounting, then cross-check it against which occupant the hand belongs to
Detection / presence scores Thresholds that decide whether a hand is accepted and when to re-detect Treat as a gate, not a probability; log values over time so drops are visible
Per-keypoint confidence / visibility Point-level score or flag (Ultralytics format) Mask low-confidence points out of geometric features rather than feeding them through

The reason for the depth warning is structural. HandyNet’s authors point out that localising hands in 2D from RGB does not tell you a hand’s 3D distance to control elements in the cabin. A relative-z value has the same limitation.

On the consuming side, “no hand” and “uncertain hand” should be explicit states your gesture or attention logic handles, not a set of coordinates that happen to have a low score attached. This is a small case of a broader principle we hold: modular, transparent, observable systems beat end-to-end magic, because when something breaks you need to know where and why. Keeping the palm stage, the landmark stage and the gating logic separate and logged is what makes a later misfire traceable.

The Main Architectural Approaches to Hand Keypoint Detection, and What Each Trades Away

Approach How it works Trade-off
Top-down (detect, then localise) Find each hand or person first, then place landmarks within each crop Accurate on benchmarks and scale invariant, but compute grows with the number of instances
Bottom-up Predict identity-free keypoint heatmaps for the whole image, then group them into instances Less complex than top-down, at some cost in accuracy
Single-stage, heatmap-free (YOLO pose) Detection and keypoint prediction in one network Accelerated performance while keeping the accuracy of large CNNs
Heatmap vs regression heads Heatmaps give a per-pixel probability for each keypoint; regression predicts coordinates directly, as MediaPipe’s landmark model does Heatmap peaks give a natural but heuristic confidence; regression needs a separate presence signal
Skeleton vs mesh output Skeleton methods estimate joint locations; mesh methods recover the full hand surface Mesh adds shape and, in BlurHand, temporal unfolding of blur, at higher complexity
Depth input instead of RGB Hands segmented and localised from a depth camera Largely unaffected by harsh or absent light and makes 3D position straightforward to calculate, but needs a depth sensor

MediaPipe is a two-stage, top-down landmarker. YOLO-Pose is single-stage, combining detection and keypoints in one model. Training technique sits across all of these families. Simon et al. (CVPR 2017) used multiview bootstrapping to label occlusion-prone hand joints: an initial detector’s noisy labels from several cameras are triangulated in 3D, outliers are discarded, and the reprojected points retrain the detector. The resulting single-image detector ran in real time on RGB with accuracy comparable to depth-based methods. For the wider landscape of body-level estimators, see our page on OpenPose and its production fit.

How Do YOLO-Based Hand Pose Models Compare with MediaPipe-Style Landmarkers for Hand Landmark Detection in a Production Pipeline?

The answer depends on hardware, the number of people or hands and the input resolution. A 2025 ISPRS Archives study on gesture recognition (HaGRID data) reported the following:

  • MediaPipe with simple classifiers reached 0.74 to 0.76 mAP.
  • YOLOv12-pose with the same classifiers did not exceed 0.69 mAP.
  • Combining YOLOv12x, MediaPipe and XGBoost reached 0.86 mAP at about 20 frames per second.

The authors suggest the YOLO-pose shortfall may come from a mismatch with HaGRID annotations. These are gesture-classification scores, not landmark localisation error, so they tell you which feature pipeline classified gestures better on that dataset, not whose keypoints were more accurate.

A LearnOpenCV comparison of YOLOv7 Pose and MediaPipe Pose found that MediaPipe did better on low-resolution inputs and ran faster on CPU. YOLOv7 handled occlusion better, detected multiple people, and ran much faster on GPU. That comparison is body pose, not hands, so treat it as an indication of architectural tendencies, not a hand result.

There is one detail teams often miss. The Ultralytics Hand Keypoints dataset (26,768 images) has keypoints generated automatically by Google MediaPipe. A YOLO hand model trained on it learns from labels MediaPipe generated automatically. Its accuracy against that dataset measures agreement with MediaPipe, not with the true joint positions.

Consideration MediaPipe-style landmarker YOLO-style single-stage pose
Target hardware Built for on-device, real-time use; faster on CPU in the body-pose comparison Faster on GPU in the body-pose comparison
Several occupants’ hands Returns landmarks for multiple detected hands Detects multiple people in the body-pose comparison
Small or distant hands Designed for hands within about 1 m Depends on input resolution and training data
Uncertainty signals Detection and presence scores Per-keypoint confidence and visibility
Label provenance Google’s training set Inherits whichever dataset it was trained on

Our view: choose on the deployment constraints and on how each candidate behaves on your hard slices, not on headline mAP.

How Do Hand Landmarks Hold up Under Occlusion, Motion Blur, Low Light and Off-Axis Angles in a Vehicle Cabin?

The evidence below comes from hand pose studies outside the cabin and from body pose in cars. The DriPE study (ICCVW 2021) explains why cabins are hard. Side-mounted cameras produce strong self-occlusion and occlusion by the dashboard and wheel. Strong illumination can make networks miss parts that are fully visible. Outside light can visually split the upper body into two halves. The low contrast of car interiors hides limbs.

Occlusion. In the 2023 metamorphic-testing study, no model tested handled severely occluded hands well. MediaPipe hands and BodyHands+OpenPose kept about 90% landmark precision up to the study’s tenth occlusion level. Their precision stayed above 40% even when the entire hand was occluded, which the authors suggest may come from the models inferring poses from hand anatomy.

Motion blur. The same study found at least half of hands went unidentified by MediaPipe hands under diagonal motion blur. Precision on the hands it did find stayed above 87% while recall fell. BlurHand (CVPR 2023) notes that prior 3D hand mesh recovery work focused on sharp images because no blurry hand datasets existed.

Low light. The hand models in the metamorphic study all degraded across four exposure test cases, and the authors expect them to fail on strongly under- or overexposed hands. XPose (WACV 2025) found a model trained on low-light images beat one trained on well-lit images by about 3.5× in MPJPE on low-light data, evidence that low light needs data of its own. Depth cameras avoid much of this problem.

Off-axis viewing. In the ISPRS study, mAP fell to 0.80 at a 60° viewing angle combined with fast gestures, which the authors put down to self-occlusion and blur. The effect of angle and speed was additive, so degradation was gradual. The 2024 patient-positioning study adds that 2D hand appearance varies so much with viewing angle that gesture recognition from 2D landmarks becomes ambiguous.

Why Does a Hand Landmark Model with Good Benchmark Scores Still Output Confident Wrong Points?

An aggregate score such as OKS-based AP is not computed at keypoint level. It says little about whether the model knows when it is wrong. Two findings explain the gap.

First, the usual metrics leave out false-positive keypoints. DriPE’s authors note that PCK and OKS-based AP leave out false-positive keypoints, and that OKS only scores annotated points, which hides errors where many keypoints cannot be annotated. Counting at body-keypoint level, they found networks overconfident and unable to detect when a keypoint was absent. For head keypoints, false positives were almost twice the true positives. They also found that fine-tuning on in-car data alone did not solve the driver-monitoring task.

Second, pose confidence scores show a calibration gap. Gu et al. (ICML 2024) show that pose estimators usually derive confidence from heuristics such as the heatmap maximum, and they demonstrate a calibration gap between confidence and accuracy. Their fix adjusts confidence using inferred instance size and visibility, and adds CCNet as a lightweight post-hoc branch on off-the-shelf models. That work is on 2D human body pose. We would expect the same heuristic-confidence problem in hand models built the same way, but nothing in the evidence measures it for hands.

There is a quieter failure too. Under blur, MediaPipe’s precision dropped but stayed above 87%, while recall fell. Blur made the models treat many hands as other objects, so those hands go undetected.

Keypoint Failure Modes a Perception Robustness Audit Needs to Test

Production AI reliability is a separate engineering discipline from accuracy. For hand landmarks it means scenario slices that exercise the estimator before release. Most pose models are trained and tested in ideal conditions, so they have to be exposed to variations that mimic real operation. The checklist below is what we would put into an in-cabin test set.

Slice What to vary What to measure Why it is on the list
Partial and full occlusion Wheel rim, dashboard, other hand, held objects Per-landmark error, plus outputs produced on hidden joints Severe occlusion defeats all tested models; HandyNet failed on unfamiliar held objects
Absent hand Frames with no hand in the expected region False-confidence rate Body-pose networks in a car study could not detect absent keypoints
Motion blur Direction and magnitude, diagonal included Recall and per-landmark error Diagonal blur was MediaPipe’s worst case
Low light and harsh light Night, underexposure, overexposure, light bands Detection rate, error, confidence drift Exposure shifts degrade all tested models
Off-axis geometry Camera angle relative to hand (30°, 45°, 60° as one design) mAP or error for each angle Accuracy fell at 60°
Small and distant hands Rear seats, wide-angle lenses Detection rate and pixel error MediaPipe is designed for hands within about 1 m
Multiple occupants Driver and passenger hands overlapping Correct hand-to-person association A scan-room pipeline used hand-body association to filter out the patient’s hands

The metamorphic study scored localisation against a fixed 10 mm threshold, the midpoint of FreiHAND’s 5 mm and 15 mm thresholds. To capture false confidence, count unmatched predictions as false positives at keypoint level, as DriPE’s mAPK does. Synthetic transformations of clean images are a cheap way to widen coverage. They have limits, though: Wang et al. found that augmenting with one corruption type did not always generalise to other unseen types.

These slices belong inside a wider robustness audit for fusion and perception pipelines, where the hand estimator is one component whose uncertainty must reach the consumer. The release-gate side, meaning evals, regression and ownership, is set out in what a production AI reliability audit actually tests.

Who Can Validate Hand Landmark Robustness for an In-Cabin Monitoring Stack?

TechnoLynx validates in-cabin perception components, hand landmark estimators included, against the occlusion, blur, low-light and off-axis slices a release reviewer will ask about. The deliverable is the validation evidence: per-slice landmark error, false-confidence rates on absent or occluded hands, and regression checks that catch a keypoint-blind model update before sign-off. That work is delivered through the Production AI Monitoring Harness, scoped to in-cabin perception. It sits within TechnoLynx’s wider computer vision R&D practice, which also builds gesture recognition systems.

The limits are clear. The deliverable is engineering evidence for a release reviewer, not regulatory sign-off. A team that already has a cabin capture rig, ground-truth labelling and an eval harness can build these slices in-house, and that is often the right call. Outside help pays off when the slices, the metrics or the release criteria do not exist yet.