Segmenting Transparent Objects in the Wild with Transformer

Enze Xie, Wenjia Wang, Wenhai Wang, Peize Sun, Hang Xu, Ding Liang, Ping Luo

Introduction

Transparent objects, such as glass doors, windows, and bottles, are ubiquitous in human environments but remain a significant hurdle for autonomous systems. Traditional depth sensors like LiDAR and sonar often fail to detect these surfaces because light and sound waves pass through or refract, creating "phantom" obstacles. While computer vision offers a potential solution, standard Convolutional Neural Networks (CNNs) are limited by their local receptive fields. Because transparent objects often inherit the texture of their background, a local view is frequently insufficient for accurate segmentation; global context is required to recognize subtle reflections or distortions as belonging to a specific object.

To address these challenges, researchers have introduced Trans10K-v2, a large-scale, fine-grained dataset, and Trans2Seg, a novel Transformer-based pipeline designed specifically for transparent object segmentation.

The Trans10K-v2 Dataset

The paper introduces Trans10K-v2, a significant evolution of the previous Trans10K-v1 dataset. It contains 10,428 high-resolution images across diverse real-world scenarios, featuring complex challenges like occlusion and perspective distortion.

Unlike earlier datasets that often used binary "transparent vs. background" labels, Trans10K-v2 provides fine-grained annotations for 11 distinct categories: shelf, jar, freezer, window, glass door, eyeglass, cup, glass wall, bowl, water bottle, and storage box. This granularity allows for more sophisticated robotic interaction and scene understanding.

Qualitative examples and category legend for the Trans10K-v2 dataset.

Trans2Seg: A Transformer-Based Approach

The proposed Trans2Seg architecture moves away from pure CNN designs in favor of a hybrid model that leverages the strengths of Transformers:

  1. Global Context Encoding: A CNN backbone (ResNet-50) extracts initial features, which are then processed by a Transformer Encoder. Through self-attention, the model achieves a global receptive field, allowing it to correlate pixels across the entire image to identify "invisible" boundaries.
  2. Learnable Class Prototypes: Instead of using fixed convolution kernels for classification, Trans2Seg formulates segmentation as a dictionary look-up problem. It employs a set of learnable class prototypes—one for each of the 11 categories—that act as queries for the Transformer Decoder. These prototypes learn the statistical essence of each category and interact with the encoder's features to generate precise attention maps.
  3. Efficient Decoding: A lightweight convolutional head up-samples these attention maps and fuses them with high-resolution features from the CNN backbone to produce the final segmentation mask.

Experimental Results

Trans2Seg was benchmarked against over 20 state-of-the-art semantic segmentation methods. It achieved a 72.15% mIoU (mean Intersection over Union), outperforming the previous best method, TransLab, by 2.1%. The improvement was particularly notable for small, difficult objects, with gains of 10.0% for "bottles" and 5.0% for "eyeglasses."

mIoU performance and GFLOPs efficiency comparison on Trans10K-v2.

Crucially, Trans2Seg demonstrates that Transformers are not necessarily more computationally expensive than CNNs for this task. As shown in the performance comparison, Trans2Seg achieves superior results with lower GFLOPs than many established CNN models like PSPNet or DANet. Ablation studies further confirmed that the Transformer architecture is the primary driver of success, as removing these components led to a performance drop of nearly 10% mIoU.

Conclusion

Trans2Seg represents a significant step forward in segmenting transparent objects by prioritizing global context and dynamic, learnable prototypes. While the task remains challenging, the combination of the Trans10K-v2 dataset and the Trans2Seg architecture provides a robust foundation for future research. Future work may explore the generalization of this learnable prototype approach to broader semantic segmentation tasks and the impact of even larger-scale pre-training.

Summary updated

BibTeX
@inproceedings{xie2021segmenting,
  author = {Enze Xie and Wenjia Wang and Wenhai Wang and Peize Sun and Hang Xu and Ding Liang and Ping Luo},
  title = {{Segmenting Transparent Objects in the Wild with Transformer}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/165},
}
Figure