Abstract
Scene graphs provide structured semantic understanding beyond images. For downstream tasks, such as image retrieval, visual question answering, visual relationship detection, and even autonomous vehicle technology, scene graphs can not only distil complex image information but also correct the bias of visual models using semantic-level relations, which has broad application prospects. However, the heavy labour cost of constructing graph annotations may hinder the application of PSG in practical scenarios. Inspired by the observation that people usually identify the subject and object first and then determine the relationship between them, we proposed to decouple the scene graphs generation task into two sub-tasks: 1) an image segmentation task to pick up the qualified objects. 2) a restricted auto-regressive text generation task to generate the relation between given objects. Therefore, in this work, we introduce image semantic relation generation (ISRG), a simple but effective image-to-text model, which achieved 31 points on the OpenPSG dataset and outperforms strong baselines respectively by 16 points (ResNet-50) and 5 points (CLIP).
Introduction
Scene graphs are structured representations where objects serve as nodes and their interactions form edges. They are vital for complex visual tasks like visual question answering and autonomous driving. However, generating these graphs is challenging due to the high labor cost of annotation and the inherent difficulty in "understanding" relationships compared to simple object identification. Traditional approaches often treat this as a standard multi-label classification problem, but they frequently fail to capture the profound relational semantics that humans intuitively grasp through a "subject-relation-object" framework.
Methodology: The ISRG Framework
The proposed Image Semantic Relation Generation (ISRG) framework decouples scene graph generation into two distinct steps: panoptic segmentation and restricted auto-regressive text generation. This approach mirrors human perception by first identifying entities and then determining their interaction.
Panoptic Segmentation and Object Highlighting
The process begins with a pre-trained segmentation model (e.g., Detectron2) to identify and segment objects within the image. The system selects the top-k most salient objects based on their area ratio. To help the model focus on specific interactions, the subject and object being evaluated are highlighted (e.g., subject in red, object in blue) while the rest of the image is grayscaled. This preprocessing step ensures the visual encoder focuses on the relevant relational features.
Hybrid Encoder-Decoder and Restricted Generation
ISRG utilizes a Vision Transformer (ViT) as the visual encoder and GPT-2 as the language decoder. Unlike shallow fusion models, ISRG mingles visual and textual embeddings at every step of the token generation process. To prevent the model from generating nonsensical or "irrational" relations, a prefix-tree (trie) constraint is implemented. This restricts the decoder's search space to only valid relation triplets found in the training set, ensuring the output remains contextually relevant and grounded in the task's semantics.
Experimental Results
The model was evaluated on the OpenPSG dataset, a large-scale benchmark containing approximately 49,000 well-annotated images. The task involves identifying the three most salient relations in an image across 50 relation classes.
ISRG achieved a state-of-the-art 31.00 Mean Recall, outperforming strong baselines by approximately 16 points (ResNet-50) and 5 points (CLIP):
- ISRG: 31.00 Mean Recall
- CLIP: 26.60 Mean Recall
- ViT: 23.49 Mean Recall
- ResNet-50: 15.50 Mean Recall
Ablation studies confirmed that the prefix-tree constraint is critical; without it, performance dropped significantly to 6.19 Mean Recall. Additionally, specific color highlighting was found to be the most effective preprocessing technique for capturing relational semantics compared to simple grayscale or no processing.
Conclusion
ISRG introduces a simple yet effective decoupled pipeline for image semantic relation generation. By leveraging human-centric intuition and structural constraints like prefix trees, the model achieves superior performance on the OpenPSG benchmark. Future work will focus on deeper integration of semantic logic and improving the robustness of the initial segmentation phase to handle missed objects.
Summary updated