Whose Hands Are These? Hand Detection and Hand-Body Association in the Wild
- Publication
- CVPR 2022Conference
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@inproceedings{objectdetectionbodyhands2022,
title = {{Whose Hands Are These? Hand Detection and Hand-Body Association in the Wild}},
author = {Supreeth Narasimhaswamy and Thanh Nguyen and Mingzhen Huang and Minh Hoai},
year = {2022},
booktitle = {CVPR},
url = {https://doi.org/10.1109/CVPR52688.2022.00484},
doi = {10.1109/CVPR52688.2022.00484}
}
Detecting hands isn't hard. A group photo may have a dozen or more hands, and today's detectors can box most of them.
The hard part is the next question. Whose hand is this?

Each color in the figure is one person. H is a hand, B is a body, and the same number means the same person. The raised hand at the upper left (H1) belongs to a person only partly visible at the left edge of the frame (B1); in the back rows, people are packed together with hands and bodies overlapping, and box positions alone can hardly tell who is who.
The work comes from Minh Hoai's lab at Stony Brook University. The first author, Supreeth Narasimhaswamy, previously built hand detection datasets such as TV-Hand and COCO-Hand, as well as ContactHands, which judges what a hand is touching. This time they push the problem one step further, finding the body box of each hand's owner while detecting the hands.
Problem Definition
Knowing whose hand it is has many uses. In a conversation among several people, you need to tell who made which gesture; when assessing a child's social skills, you need to know which hand touched a toy and which touched another person; for a hand holding a power tool in a factory, you need to know where its owner is standing.
The two most obvious approaches both run into trouble in crowded scenes.
Detect separately, then pair up. First detect all the hands and all the people, then assign hands to people with rules based on distance, size, overlap area and the like. The problem is that hands move. An arm can stretch far out or tuck in against the chest, so the relative position and size of hand and body vary too much for fixed rules to capture.
Use human pose. Pose estimation gives each person a skeleton, and whoever's wrist is there owns the hand. But in crowded scenes, one person's arm often gets attached to someone else's skeleton, and for people who are half occluded or extend beyond the frame, no skeleton is detected at all.
Another difficulty is that overlap doesn't help much. A person's hand always overlaps that person's own body box, but a hand that overlaps a body box doesn't necessarily belong to that person. In the data the authors compiled, more than a third of the people have hands that clearly overlap someone else's body box.
The authors give the task a precise definition. For each image, detect the set of hands and the set of bodies , such that:
- Each hand is assigned to exactly one body.
- Each body is assigned at most two hands.
Here "body" means all the visible parts of the person. If the detector fails to find any person at all, the hand box itself is used as the body box.
Solution
Architecture

The framework is Mask R-CNN, detecting only two classes, hands and bodies. The red line at the top of the figure and the green line at the bottom are the original Mask R-CNN outputs, each giving boxes and masks.
What's new is the yellow Hand-Body Association Network in the middle. For each detected hand , it computes the probability that each body is the hand's owner.
Split into Two Terms
This probability is hard to learn directly, so the authors split it apart. The key is a very simple observation that a hand is part of the body, so a person's hand box and body box always overlap.
Let indicate whether the two boxes overlap. If they don't, they can't belong to the same person:
Expanding over the two cases of with the law of total probability, the term drops out, leaving only:
Assuming further that whether they overlap is independent of the hand itself, the first term simplifies to . Each term goes to its own module.
Overlap Estimation Module
The first term asks whether this hand and this body overlap.
Both boxes are already there, so why not just compute the IoU? The authors deliberately don't. Instead they feed the appearance features of the hand and the body into a small network , which predicts the probability that the two overlap and is trained with binary cross-entropy.
The reasoning is that overlap itself carries the geometric relationship between the two regions. Forcing the network to learn that relationship from appearance yields features that are better at telling which hand belongs to whom. The ablation later backs this up.
Positional Density Module
The second term asks where the body is likely to be, given that they overlap.
A hand's appearance and position give away something about where its owner is. Which way the palm faces and the angle at which the arm reaches in are both clues. The authors have the network predict, from the hand's appearance and position, where the owner's body sits relative to the hand, .
The relative position uses the same encoding Faster R-CNN uses for box regression:
The center offset is divided by the hand's width and height, and size is taken as a log ratio. That way the values fall in about the same range no matter how big the photo is or how far away the person stands.
But taking the prediction as the answer is too risky. The size ratio between hand and body varies a lot, and in crowds they occlude each other, so the predicted position may be far off. So instead of using to look up the nearest body directly, the authors treat it as the center of a distribution:
The farther a body is from the predicted position, the lower its probability. Training uses a smooth-L1 loss to pull the predicted toward the true body's relative position.
Multiplying the two terms gives a score for every hand-body pair. The total loss is Mask R-CNN's original three terms for classification, box and mask, plus the losses of the two new modules, each weighted by 0.1.
Hungarian Matching
The last step is matching. With as the edge weights of a bipartite graph, the Hungarian algorithm finds the matching with the highest total score.
But the Hungarian algorithm is one-to-one, so each body can take only one hand, while people have two. The authors' fix is direct. They duplicate the set of bodies before matching, so each body appears twice and can be matched to two hands.
Another variant allows a hand to be assigned to itself, that is, the hand box itself serves as the body box. This option comes in handy when the hand's owner is entirely out of frame.
The BodyHands Dataset
The authors built the new dataset on top of their earlier ContactHands. ContactHands' images come from COCO, PASCAL VOC, Oxford-Hand and others, already carry polygon annotations for hands, and happen to cover a wide range of skin tones, sizes, blur and mutual occlusion.
Annotators drew the owner's body box for every annotated hand and gave a person's hands and body the same ID number. People in the image without hand annotations were drawn as well, all of them if there were five or fewer and at least five otherwise, to serve as negatives.
The result is 20,490 images, 57,898 hands and 63,095 people. Of these, 19,044 people have both hands annotated, 19,810 have only one, and 24,241 have none because their hands were occluded or too small. The train/test split follows ContactHands.
Compared with COCO-WholeBody, BodyHands is far more crowded. People whose hands overlap someone else make up 34% of BodyHands and only 19% of COCO-WholeBody.
Discussion
Evaluation
There are three evaluation metrics:
- Hand AP: hand detection AP at an IoU threshold of 0.5.
- Conditional accuracy (Cond. Accuracy): among correctly detected hands, the fraction whose assigned body box has an IoU above 0.5 with the ground truth.
- Joint AP: a prediction counts as correct only if the hand is detected and the body is matched correctly, with both IoUs above 0.5. This is the strictest metric.
Main Results
| Method | Hand AP | Cond. acc. | Joint AP |
|---|---|---|---|
| OpenPose | 39.69 | 74.03 | 27.81 |
| Keypoint Communities | 33.62 | 71.48 | 20.71 |
| Mask R-CNN + feature distance | 84.82 | 41.38 | 23.16 |
| Mask R-CNN + center distance | 84.82 | 72.83 | 50.42 |
| Mask R-CNN + IoU | 84.82 | 74.52 | 51.74 |
| Proposed | 84.82 | 83.44 | 63.48 |
| Proposed + hand self-assignment | 84.82 | 84.12 | 63.87 |
Compiled from Table 1 of the paper, BodyHands test set.
Start with the pose estimation methods. OpenPose's hand detection reaches only 39.69 AP, and that is after the authors loosened the criterion so that any overlap between the hand box and the ground truth counts as correct. In photos taken in the wild, hand keypoints go wrong far too easily.
Now the five rows below. All the Mask R-CNN variants use the same detector, so their Hand AP is 84.82 across the board; the difference lies entirely in how they match.
Matching by the distance or similarity of feature vectors gives a conditional accuracy of only about 40%, and Joint AP falls to around 23. The features a detector learns are for telling whether something is a hand or a body; they aren't suited to judging whether this hand belongs to this person.
Simple geometric rules actually do much better. Matching by the distance between hand and body centers, or directly by the IoU of the two boxes, gives a conditional accuracy above 70% and a Joint AP just over 50. The proposed method pushes conditional accuracy to 83.44 and Joint AP to 63.48, almost 12 points above the best rule.
On COCO-WholeBody, the proposed method's Joint AP is 62.87, about 10 points above the IoU rule's 53.08.
Ablations
| Variant | Joint AP |
|---|---|
| Full model | 63.48 |
| No overlap estimation | 59.03 |
| No positional density | 50.29 |
| Overlap from the boxes | 60.34 |
Compiled from the ablation in §5.1.2 of the paper, BodyHands test set. A removed module's probability is set to 1, and hand self-assignment is not used.
The positional density module matters most. Removing it costs 13 points, nearly back to the level of the IoU rule. Without the overlap estimation module, the model loses 4 points.
The last row answers the earlier question. Replacing the overlap estimation module with overlap computed directly from the two boxes gives a Joint AP of 60.34, 3 points below having the network predict it from appearance. Box geometry alone can't tell whether that's the same person's body; letting the network look at appearance to learn overlap gives a more accurate signal.
Failure Cases

The right column shows the failure cases. Most errors come from either a wrongly detected hand or, in a very crowded scene, a hand assigned to the person next to its owner.
Downstream 1: Hand Tracking
Once you know whose hand it is, tracking hands gets much easier.
Hands move fast, and their position and size can change a lot between consecutive frames, so linking tracks by hand-box IoU alone easily loses the hand or mixes up identities. The authors' idea is to bind each hand to its body and, when computing similarity between consecutive frames, look at both the hand IoU and the body IoU. Bodies move more slowly than hands, so the body gives the hand a steadier reference.
The authors collected 20 YouTube videos of several people interacting and annotated every 15th frame, for a total of 3,299 frames, 8,893 hands and 131 tracks, which they call YoutubeHands-20.
| Linking | ID switches | MOTA |
|---|---|---|
| Re-ID features | 817 | 42.0 |
| Hand IoU | 624 | 46.1 |
| Optical flow | 882 | 40.7 |
| Pose (LightTrack) | 591 | 46.8 |
| Hand + body IoU | 436 | 50.0 |
Compiled from Table 2 of the paper, YoutubeHands-20. All five methods use the same detector, with the same FP and FN (681 and 1,284).
The detections are identical; only the linking differs. Looking at hand and body together cuts ID switches from 624 to 436 and raises MOTA from 46.1 to 50.0.
The authors also tried end-to-end trackers such as FairMOT and CenterTrack, which reach a MOTA of only 8.6 and 10.7 and each miss more than 3,800 hands. Without large-scale hand tracking data to train on, these methods, designed for pedestrians and vehicles, don't carry over well to hands, whose shapes keep changing.
Downstream 2: Contact State
ContactHands asks what a hand is touching, in four categories: no contact, self contact, other-person contact and object contact. The hardest is other-person contact, where the best result at the time was only 39.51 AP.
The difficulty is that the image around a hand can show that it is touching someone's body, but it's hard to tell whether that body is the hand's owner or someone else. Once you know who the hand belongs to, this becomes easy.
The authors first tried a simple post-processing rule. If a detected hand's overlap with every other person is less than 15% of the hand's area, its other-person contact score is reduced by 0.5, and AP rises to 40.89. Then, by concatenating hand and body features and training a contact classification branch end to end, other-person contact AP jumps to 47.09, and the mean over the four categories goes from 57.41 to 60.56.
Conclusion
This paper defines a new task, whose hand is this, and comes with a dataset of twenty thousand images and a method that isn't complicated. At its core is a probability decomposition that first asks whether hand and body overlap, then roughly where the body is, and hands the result to the Hungarian algorithm for matching; to let one person take two hands, the bodies are simply duplicated.
The official release, under the MIT license, includes Detectron2-based code, weights and the dataset; the README demo uses --thresh 0.7, and lowering it finds more hands. If you don't have time to train a new model, start with the IoU rule from the table, at 51.74 Joint AP, which needs only a detector that finds hands and people plus one pass of the Hungarian algorithm.
The authors are also blunt at the end. The method still makes plenty of mistakes, especially assigning hands to the wrong person in crowded scenes, so its output shouldn't be used as evidence to accuse anyone.