Papers › Efficient Two-Stage Detection of Human-Object Interactions with a Novel Unary-Pairwise...

Efficient Two-Stage Detection of Human-Object Interactions with a Novel Unary-Pairwise Transformer

3 Dec 2021CVPR 2022 1arXiv:2112.01838archive 2025-07-28

Frederic Z. Zhang, Dylan Campbell, Stephen Gould

Recent developments in transformer models for visual data have led to significant improvements in recognition and detection tasks. In particular, using learnable queries in place of region proposals has given rise to a new class of one-stage detection models, spearheaded by the Detection Transformer (DETR). Variations on this one-stage approach have since dominated human-object interaction (HOI) detection. However, the success of such one-stage HOI detectors can largely be attributed to the representation power of transformers. We discovered that when equipped with the same transformer, their two-stage counterparts can be more performant and memory-efficient, while taking a fraction of the time to train. In this work, we propose the Unary-Pairwise Transformer, a two-stage detector that exploits unary and pairwise representations for HOIs. We observe that the unary and pairwise parts of our transformer network specialise, with the former preferentially increasing the scores of positive examples and the latter decreasing the scores of negative examples. We evaluate our method on the HICO-DET and V-COCO datasets, and significantly outperform state-of-the-art approaches. At inference time, our model with ResNet50 approaches real-time performance on a single GPU.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2112.01838")

Code

Syntology Ran 2 of 4 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 2 ran · honoured contract.

By repository: official repository: 4 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

fredzzhang/upt officialmentioned on GitHubpytorchBSD-3-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

4 samples harvested; 2 ran; 2 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
2unverified

Licence: 0 of the 4 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from fredzzhang/upt. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

box_cxcywh_to_xyxy fredzzhang/upt/ops.py official repository ran · honoured contract fingerprinted BSD-3-Clause (permissive) · e0a06ded5d4f6c3c · report
box_xyxy_to_cxcywh fredzzhang/upt/ops.py official repository ran · honoured contract fingerprinted BSD-3-Clause (permissive) · 031b02fb990284ba · report
compute_spatial_encodings fredzzhang/upt/ops.py official repository unverified BSD-3-Clause (permissive) · 000414180baf0027 · report
custom_collate fredzzhang/upt/utils.py official repository unverified BSD-3-Clause (permissive) · 8c73b8b7646a5ae4 · report

Tasks

Human-Object Interaction Detection

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Human-Object Interaction Detection HICO-DET UPT-R101-DC5 Time Per Frame (ms) 124 #20 of 55 Archive leaderboard report
Human-Object Interaction Detection HICO-DET UPT-R101-DC5 mAP 32.62 #20 of 55 Archive leaderboard report
Human-Object Interaction Detection HICO-DET UPT-R101 Time Per Frame (ms) 61 #22 of 55 Archive leaderboard report
Human-Object Interaction Detection HICO-DET UPT-R101 mAP 32.31 #22 of 55 Archive leaderboard report
Human-Object Interaction Detection HICO-DET UPT-R50 Time Per Frame (ms) 42 #25 of 55 Archive leaderboard report
Human-Object Interaction Detection HICO-DET UPT-R50 mAP 31.66 #25 of 55 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R101-DC5 AP(S1) 61.3 #10 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R101-DC5 AP(S2) 67.1 #10 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R101-DC5 Time Per Frame(ms) 131 #10 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R101 AP(S1) 60.7 #11 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R101 AP(S2) 66.2 #11 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R101 Time Per Frame(ms) 64 #11 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R50 AP(S1) 59.0 #12 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R50 AP(S2) 64.5 #12 of 34 Archive leaderboard report
Human-Object Interaction Detection V-COCO UPT-R50 Time Per Frame(ms) 43 #12 of 34 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionDense ConnectionsDropoutLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections