TL;DR
This paper introduces iCMFormer, a novel interactive image segmentation method that leverages Vision Transformers (ViTs) and explicitly models the cross-modal relationship between image features and user-provided clicks. By introducing cross-modality attention blocks, iCMFormer achieves state-of-the-art performance and improved robustness, making it a promising tool for efficient image annotation.
What Problem Does This Paper Address?
Interactive image segmentation (IS) aims to precisely segment an object of interest within an image, guided by user interactions like clicks, scribbles, or bounding boxes. This is a crucial task for tasks like image editing and, importantly, for generating large-scale labeled datasets for other computer vision applications. While recent advancements have seen the application of powerful Vision Transformers (ViTs) to IS, existing methods often treat image and click information separately or simply concatenate them, neglecting the crucial interplay between these modalities. This can lead to suboptimal performance, especially in the early stages of interaction, and a mismatch in feature representations. The paper addresses this gap by proposing a method that explicitly models the cross-modal guidance between image and click features within a ViT architecture.
Methods
The core innovation of this work is the introduction of cross-modality transformers within a Vision Transformer framework for interactive segmentation. The proposed architecture, iCMFormer, utilizes two main components:
- Backbones: The method is flexible and can be built upon either a plain Vision Transformer (ViT-B) or a hierarchical Vision Transformer like Swin-Transformer (Swin-B). These backbones are responsible for extracting features from both the input image and the user's clicks.
- Cross-Modality Attention Blocks: These are the key novel components. Instead of relying solely on self-attention within each modality, these blocks employ multi-head attention (MHA) in two steps:
- Self-attention on the guiding modality (clicks): This allows the click features to attend to themselves.
- Cross-attention between image and click features: Here, queries from the image features attend to keys and values from the click features. This allows the image features to be guided by the click information, effectively learning the cross-modal relationships. These cross-modality blocks are strategically placed within the transformer architecture, typically in the middle stages, to refine the feature representations. The fused features are then passed to a segmentation head for final prediction. The paper also adopts a click simulation strategy similar to RITM, incorporating the previous segmentation mask as an additional input channel for the click branch.
Datasets
The proposed method is evaluated on four widely used datasets for interactive segmentation:
- GrabCut: Contains 50 images with single instance masks.
- Berkeley: Features 96 images with 100 instance masks, known for challenging objects with similar backgrounds.
- SBD (Semantic Boundaries Dataset): Used for training and validation, providing a large number of images and instances.
- DAVIS (Densely Annotated Video Segmentation): A dataset designed for video semantic segmentation, with 345 frames used for evaluation.
For large-scale training, the authors also utilize a combined dataset of COCO + LVIS, which offers higher annotation quality and a larger number of instances (118K images, 1.2M instances).
Key Insights and Ideas
- Explicit Cross-Modal Guidance is Crucial: The paper strongly advocates for explicitly modeling the interaction between image and click features, rather than simply concatenating them. This is highlighted by the performance drop when only using self-attention on image features with click guidance (Table 5).
- Vision Transformers are Well-Suited for Interactive Segmentation: The success of ViTs in other vision tasks translates well to IS, and their attention mechanisms are naturally adaptable to incorporating user guidance.
- Hierarchical ViTs Enhance Multi-Scale Handling: Using hierarchical backbones like Swin-Transformer, which inherently handle multi-scale features, further improves performance in interactive segmentation.
- Robustness to Failure Cases: The proposed method demonstrates improved stability and a lower number of failures (NoF) compared to previous methods, suggesting its potential as a practical annotation tool.
Key Results
- State-of-the-Art Performance: iCMFormer achieves state-of-the-art results on four benchmarks (GrabCut, Berkeley, SBD, and DAVIS) when trained on SBD.
- Reduced Clicks: The method significantly reduces the number of clicks (NoC) required to reach target IoU thresholds, particularly on datasets like DAVIS, where it requires almost one less click.
- Improved Accuracy: On Berkeley, iCMFormer achieves 90% IoU with less than 2 clicks.
- Competitive Results with Large-Scale Training: Even when trained on the larger COCO + LVIS dataset, iCMFormer maintains competitive performance.
- Low Failure Rate: The proposed method exhibits a lower number of failures (NoF) across datasets, indicating its robustness. For instance, it reduces failure cases below 700 on SBD, outperforming f-BRS by 52.7%.
- Efficient Inference: Despite using more powerful backbones, the inference speeds of iCMFormer are reported to meet the requirements for real-time interactive segmentation.
Limitations and Future Work
- Cluttered and Occluded Targets: The paper acknowledges that the method struggles with segmentation when targets are cluttered or partially occluded, as shown in a failure case from SBD (Figure 5, last row). The authors suggest that local refinement techniques and post-processing optimizations could address this.
- Handling Multiple Instances: While the paper notes an interesting finding where iCMFormer adapts to interactions for different instances of the same category (Figure 6), further exploration in this area for more efficient annotation of multi-instance scenes is suggested.
- Future Work: The authors suggest exploring local refinement techniques and further investigating the handling of multiple instances as potential avenues for future research.
Summary updated