End-to-End Human Object Interaction Detection with HOI Transformer

Cheng Zou, Bohan Wang, Yue Hu, Junqi Liu, Qian Wu, Yu Zhao, Boxun Li, Chenguang Zhang, Chi Zhang, Yichen Wei, Jian Sun

Introduction: The Challenge of HOI Detection

Human-Object Interaction (HOI) detection is a complex computer vision task that goes beyond simple object recognition. It requires a model to not only localize humans and objects within an image but also to accurately characterize the semantic relationship between them. For instance, in an image of a person and a bicycle, the model must distinguish between "riding," "walking next to," or "repairing" the bike.

Historically, this has been approached through multi-stage pipelines. Two-stage methods first detect all entities and then exhaustively check all possible pairs, which is computationally inefficient. One-stage methods try to simplify this by detecting "interaction points," but they often require brittle, hand-crafted post-processing to link these points back to the original entities.

Comparison of HOI detection paradigms: (a) Two-stage, (b) One-stage, and (c) the proposed End-to-End HOI Transformer.

The HOI Transformer introduces a paradigm shift by treating HOI detection as a direct set prediction problem. By leveraging the power of Transformers, it eliminates the need for surrogate tasks and complex heuristics, providing a streamlined, end-to-end solution.

The HOI Transformer Architecture

The core of the proposed method is a Transformer-based encoder-decoder architecture, inspired by the DEtection TRansformer (DETR). The process begins with a standard CNN backbone, such as ResNet-50 or ResNet-101, which extracts high-level visual features from the input image.

The detailed architecture of the HOI Transformer, showing the flow from image features to quintuple instance predictions.

Feature Extraction and Encoding

The extracted features are flattened and augmented with positional encodings before being passed into a Transformer Encoder. The encoder's role is to model global dependencies across the entire image, creating a "global memory" where every pixel's context is informed by every other pixel. This is particularly beneficial for HOI detection, where the interaction might depend on subtle cues spread across the frame.

Decoder and HOI Queries

The Transformer Decoder takes a fixed set of $N$ learned positional embeddings, referred to as "HOI queries." These queries attend to the global memory to extract information relevant to potential interaction instances. Each query is then transformed into an output embedding.

Quintuple Prediction and Matching

Unlike standard object detectors that predict bounding boxes and class labels, the HOI Transformer uses multi-layer perceptrons (MLPs) to decode each output embedding into a quintuple: (human confidence, object confidence, interaction confidence, human bounding box, and object bounding box).

To train the network, the authors employ a bipartite matching loss using the Hungarian algorithm. This ensures a unique one-to-one assignment between the $N$ predicted quintuples and the ground truth interactions. The loss function is a weighted combination of classification losses (cross-entropy) and localization losses (GIoU and L1 loss), forcing the model to optimize for the entire interaction triplet simultaneously.

Experimental Setup and Datasets

The HOI Transformer was rigorously evaluated on two primary benchmarks:

  • HICO-DET: A comprehensive dataset featuring 47,776 images and 600 HOI categories. It is characterized by a long-tail distribution, with categories split into "Rare" (fewer than 10 training instances) and "Non-Rare."
  • V-COCO: A smaller but widely used subset of MS-COCO, containing approximately 10,000 images and 29 action categories.

Key Insights: Why Transformers Work for HOI

The shift to a Transformer-based architecture provides several qualitative advantages over traditional CNN-based methods:

  • Global Contextual Awareness: Visualizations of the decoder's attention maps show that the model learns to focus on the most informative regions for a specific interaction. For example, when detecting a "kick" interaction, the model attends to the human's leg and the ball, even if they are separated by a significant distance.
  • Handling Long-Range Interactions: Traditional methods often rely on local features or union boxes, which fail when the human and object are far apart (e.g., a person flying a kite). The Transformer's global receptive field naturally handles these cases.
  • Matching Priority: Ablation studies indicated that the model performs better when the bipartite matching process prioritizes interaction classification over precise bounding box overlap. This suggests that identifying the nature of the interaction is the primary driver for successful HOI detection.

Performance and Results

The HOI Transformer sets a new state-of-the-art for end-to-end HOI detection:

  • Accuracy: On HICO-DET, the ResNet-101 version achieved 26.61% AP on the Full set, representing a significant 4.88% absolute improvement over previous leading one-stage methods like PPDM.
  • Efficiency: The model is remarkably fast, achieving 24 FPS on a single NVIDIA 2080Ti. This makes it suitable for real-time applications, a feat rarely achieved by high-accuracy two-stage models.
  • V-COCO Performance: It achieved 52.9% $AP_{role}$, outperforming all previous one-stage competitors and matching the performance of much more complex systems that utilize auxiliary data like human pose skeletons.

Conclusion and Future Directions

The HOI Transformer demonstrates that a simple, unified architecture can outperform complex, multi-stage pipelines. By framing HOI detection as a set prediction problem, the authors have removed the need for hand-crafted components like Non-Maximum Suppression (NMS) or interaction point heuristics.

However, challenges remain, particularly regarding the "Rare" categories in HICO-DET. The model's performance on these long-tail interactions (19.15% AP) lags behind its performance on common ones (28.84% AP). Future research will likely focus on incorporating few-shot learning techniques or external knowledge bases to better handle these infrequent but important interaction types.

Summary updated

BibTeX
@inproceedings{zou2021end,
  author = {Cheng Zou and Bohan Wang and Yue Hu and Junqi Liu and Qian Wu and Yu Zhao and Boxun Li and Chenguang Zhang and Chi Zhang and Yichen Wei and Jian Sun},
  title = {{End-to-End Human Object Interaction Detection with HOI Transformer}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01165},
}
Figure