TL;DR
DSFlash is a novel, low-latency model for panoptic scene graph generation (PSGG) that achieves state-of-the-art accuracy while operating in real-time (up to 56 FPS on an RTX 3090). By unifying the segmentation and feature backbones, predicting relationships bidirectionally, and dynamically pruning irrelevant image patches, it delivers comprehensive scene graphs efficiently enough for deployment on resource-constrained edge devices.
What Problem Does This Paper Address?
Scene Graph Generation (SGG) converts an image into a structured graph where nodes represent objects and edges represent their relationships (e.g., [person] -> (sitting on) -> [chair]). Panoptic SGG (PSGG) takes this a step further by using precise segmentation masks instead of coarse bounding boxes to localize objects.
While highly valuable for downstream tasks like robotics and visual question answering, existing PSGG models are computationally heavy and slow. To cope, prior real-time approaches often restrict themselves to predicting only a small subset of "salient" relationships. The authors of DSFlash tackle this efficiency bottleneck head-on, aiming to generate comprehensive scene graphs (evaluating all potential pairs of objects) in real-time without sacrificing accuracy or requiring massive hardware clusters.
Methods
DSFlash builds upon the two-stage architecture of DSFormer but introduces several critical optimizations to eliminate redundant computations:
- Merged Backbones: Instead of running two separate networks for object segmentation and feature extraction, DSFlash uses a single, frozen Encoder-only Mask Transformer (EoMT). Spatial features are extracted directly from intermediate layers of this segmentation model, cutting out an entire backbone's worth of forward passes.
- Bidirectional Predictions: Standard two-stage models require two separate forward passes through the relation head to check both directions of a relationship ($A \rightarrow B$ and $B \rightarrow A$). DSFlash introduces a gating mechanism and a shared Multi-Layer Perceptron (MLP) that predicts both relationship directions simultaneously in a single pass.
- Raw-resolution Segmentation Masks: Rather than upsampling mask logits to the full image size via costly bilinear interpolation just to calculate patch overlaps, DSFlash performs these calculations directly at the low resolution ($13 \times 13$) required by the transformer neck.
- Mask-Based Dynamic Patch Pruning: Image patches that do not overlap with either the subject or the object mask contain little contextual value for relationship classification. DSFlash dynamically drops these irrelevant patches before they enter the transformer neck, significantly reducing the token count.
Datasets
The model is trained and evaluated on the Panoptic Scene Graph (PSG) dataset, which consists of 49k images derived from the overlap of Visual Genome and COCO. It features high-quality panoptic segmentation masks and annotations covering 56 carefully selected predicate classes.
Key Insights and Ideas
- Segmentation Quality Dictates SGG Performance: The authors demonstrate a striking linear correlation between the performance of the underlying segmentation backbone ($mR@inf$) and the final scene graph accuracy ($mR@50$). Investing in a better segmentation model directly yields a better scene graph generator.
- Symmetry via Consistency Loss: When designing the bidirectional head, the model initially suffered from dataset bias (the ground truth favored one direction). Introducing a feature consistency loss during training forced the model to treat both directions equally, improving overall accuracy.
- Hardware-Dependent Pruning Gains: Highly capable GPUs (like the H100 or RTX 3090) process tokens so efficiently in parallel that patch pruning yields minimal latency improvements for a batch size of 1. However, on older or edge hardware (like a GTX 1080), reducing the token workload via pruning results in a measurable, highly practical speedup.
Key Results
DSFlash achieves a new state-of-the-art on the PSG dataset while dramatically lowering latency:
- Accuracy: The largest variant, DSFlash-L, achieves 30.90 mR@50, outperforming the previous state-of-the-art (DSFormer at 30.70) while being nearly 9x faster (50 ms vs 458 ms).
- Speed: The smaller DSFlash-S variant achieves a latency of just 18 ms (56 FPS)* on an RTX 3090, making it fully capable of real-time video processing.
- Resource Efficiency: Demonstrating extreme accessibility, DSFlash can be trained from scratch in less than 24 hours on a single, nine-year-old GTX 1080 GPU.
Limitations and Future Work
While low-resolution segmentation masks significantly boost speed, they degrade the model's ability to accurately resolve very small objects or dense scenes, leading to a slight performance penalty. Additionally, applying dynamic patch pruning without fine-tuning the model specifically on pruned sequences causes a minor drop in mean recall ($mR@50$).
For future work, the authors note that because DSFlash strictly decouples feature extraction from relation classification, researchers can seamlessly drop in next-generation vision backbones as they become available to achieve even better speed and accuracy.
Summary updated