All models

RelTR

A one-stage encoder-decoder transformer that predicts scene graph triplets directly from an image.

Detection and tracking · 2,793 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 2,793 operations (137 KB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
63.9M
Operations
2,793
Framework
PyTorch
Recurrent
No
Published
IEEE TPAMI 2023
Cited by
244 (as of 28 October 2026)
Authors
Yuren Cong, Michael Ying Yang, Bodo Rosenhahn
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m19810
Graph hash
23b7086f6b1a2fcaf433d03d0bf8342a4a48b82442e05944a97fd97cc755acd1
Skeleton hash
2a3020a8ad314a18921d3de5cd07e4fc01e0d7a3e11097b0b752766245e84777
Architecture hash
10b9d4c0f4316578a2b6c5e4c7cc2b9d3644ef619895a9e3fd13e6a922bf2def
Diagram SHA-256
1fa4cba90e83d542fa1aa1c8243096066f0326104274f2d8f9ea4aee03b11c18
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

RelTR (Relation Transformer) is a one-stage model for scene graph generation that predicts a set of relationships directly from visual appearance, without combining entities and labeling all possible predicates. The paper's premise is that the objects in a scene are more or less related to each other, but only a limited number of those relationships are noteworthy. Inspired by DETR, the paper views scene graph generation as a set prediction problem and gives RelTR an encoder-decoder architecture.

The encoder reasons about the visual feature context, and the decoder infers a fixed-size set of subject-predicate-object triplets using different types of attention with coupled subject and object queries. Training uses a set prediction loss that matches the predicted triplets to the ground truth. The repository contrasts this with approaches that infer dense relationships between all entity proposals, while RelTR generates a sparse scene graph by decoding the visual appearance.

The paper reports experiments on the Visual Genome and Open Images V6 datasets. The model the repository releases for inference is pretrained on Visual Genome. The paper was accepted by IEEE Transactions on Pattern Analysis and Machine Intelligence.

Key idea. RelTR treats scene graph generation as set prediction and decodes a fixed-size set of subject-predicate-object triplets in one stage with coupled subject and object queries.

  • RelTR
  • Relation Transformer
  • scene graph generation
  • one-stage scene graph generation
  • subject-predicate-object triplets
  • visual relationships
  • set prediction
  • sparse scene graph
  • Visual Genome
  • Open Images V6

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{cong2023reltrrelationtransformerscene,
      title={RelTR: Relation Transformer for Scene Graph Generation}, 
      author={Yuren Cong and Michael Ying Yang and Bodo Rosenhahn},
      year={2023},
      eprint={2201.11460},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2201.11460}, 
}