OMTSeg: Open-Vocabulary Panoptic Segmentation
- OMTSeg is an architecture for open-vocabulary panoptic segmentation that integrates vision and text by using a unified BEiT-3 backbone alongside a Mask2Former-style segmentation head.
- It employs deep cross-modal attention, spatial feature adapters, and prompt tuning to adapt pre-trained representations for dense prediction tasks.
- Empirical results on datasets like ADE20K and COCO validate OMTSeg's performance improvements, highlighting the effectiveness of its multiway fusion and visual adaptation strategies.
OMTSeg is an architecture for open-vocabulary panoptic segmentation that leverages large-scale vision-language pre-training, specifically using BEiT-3 as a unified multiway transformer backbone integrated with a Mask2Former-style segmentation head. OMTSeg enables generalized segmentation over arbitrary categories by fusing image and text input throughout the model, achieving state-of-the-art performance via deep cross-modal attention, spatial feature adapters, and prompt-tuned word tokens (Chen et al., 2024).
1. Unified Pipeline and Input Tokenization
An RGB image and a list of category names form the model's inputs. The image is partitioned into non-overlapping patches (e.g., pixels each). Each patch is linearly embedded into a -dimensional vector, resulting in , with a 1D positional encoding added to produce . For the language modality, all category names are concatenated into a marker-separated string (e.g., “ person ; snow ; snowboard”), tokenized using a WordPiece tokenizer into tokens. The shared 0-dimensional embedding layer yields 1, and positional encodings produce 2. Since BEiT-3 was pre-trained on aligned multimodal data, 3 and 4 can be concatenated and directly processed by the subsequent transformer stack.
2. Layer-wise Multiway Fusion Transformer
OMTSeg directly inherits the BEiT-3 fusion encoder consisting of 5 identical multiway transformer layers (typically 6). Each layer ingests the concatenated sequence 7, applying multiway multi-head self-attention (MultiwayMHSA):
8
with 9 attention heads (typically 0, 1), each head computing:
2
By never segregating vision and language, cross-modal interaction is enabled at every transformer layer. After self-attention, 3 is split back into visual and language components, which are then separately updated via their respective feed-forward networks:
4
The concatenated features 5 are propagated through all 6 layers, yielding deep, bidirectional cross-modal representations as opposed to CLIP's single-layer contrastive alignment.
3. Visual Adapters and Prompt Tuning
To address the absence of dense-prediction specialization in BEiT-3, OMTSeg introduces a frozen backbone with trainable “visual adapter” modules and a mechanism for category prompt tuning.
- Spatial Prior Module (SPM): A convolutional stem (ResNet-style) outputs multi-resolution feature maps at 7, 8, and 9 input scales; each is projected to 0 channels by 1 convolutions.
- Spatial Feature Injector (SFI): At each transformer block, the current patch features 2 are queries in a cross-attention with SPM outputs 3 as keys/values: 4, thereby enriching transformer tokens with local convolutional information.
- Multi-Scale Feature Extractor (MSFE): SPM features are attended back to updated transformer features: 5.
- Prompt Tuning: Only the 6 marker token embeddings are fine-tuned, with 7 for each 8 token, improving the alignment to category names.
A plausible implication is that spatial adaptation and targeted prompt tuning are critical in transferring BEiT-3's pre-trained representations to dense, open-vocabulary outputs.
4. Mask2Former-Style Multiway Segmentation Head
The final multi-modal representations yield input to a Mask2Former-style decoder:
- 9 (patch tokens) and 0 (word tokens) from BEiT-3 and adapters are inputs.
- A fixed set of object queries 1 (typically 2) is initialized.
- Each of 3 decoder layers performs:
- Masked Multi-Head Cross-Attention (MaskedMHCA): Queries in 4 attend to 5 yielding 6 object-centric features.
- Multi-Head Cross-Attention with Language: Queries now also attend to 7 for category semantics.
- Self-Attention and Feed-Forward: Standard transformer sublayer updates.
Final outputs per query: (1) a binary mask logit map 8, (2) a mask feature 9, and (3) an objectness score 0.
Panoptic fusion follows Mask2Father: instance masks are sorted by 1, thresholded, assigned unique IDs, with “stuff” regions filled in via “stuff” category predictions.
5. Training Objectives and Optimization
The loss function combines three elements:
- Mask Loss: Per-pixel binary cross-entropy over the 2 mask predictions:
3
- Open-Vocabulary Classification Loss: Cosine similarity between each 4 and 5 token embedding 6, cross-entropy over correct category 7:
8
- Contrastive Alignment Loss: CLIP-style contrastive loss to enhance alignment between (mask, word) pairs:
9
- The total loss is 0, with weights set to equal or tuneable scalars.
6. Model Hyperparameters
OMTSeg adopts hyperparameters mainly from BEiT-3 large:
| Hyperparameter | Typical Value | Purpose |
|---|---|---|
| 1 | 2 | Embedding dimension |
| 3 | 4 | Transformer layers |
| 5 | 6 | Attention heads |
| 7 | 8 | FFN hidden dimension |
| 9 | 0 | Object queries |
| 1 | 2 | Decoder layers |
| Visual Adapter scales | 3, 4, 5 | Multi-resolution feature injection |
| 6Embed | 7 per category | Prompt-tuning per token |
These parameter selections support both large-capacity multimodal representation and dense spatial adaptation.
7. Empirical Results and Ablative Analyses
On ADE20K-150, OMTSeg achieves 8 mIoU, surpassing the prior best (ODISE) by over 9 points; on Pascal VOC-21 it reaches 0 mIoU. In panoptic segmentation, OMTSeg obtains PQ = 1, AP = 2, mIoU = 3 on ADE20K, outpacing ODISE's PQ = 4. On COCO Panoptic, OMTSeg achieves PQ = 5 with a model size of 6M parameters (Chen et al., 2024).
Ablation studies on ADE20K demonstrate component necessity:
| Ablation | PQ Delivered | Effect |
|---|---|---|
| Full OMTSeg | 7 | Baseline |
| No cross-modal attention | 8 | 99.1 PQ |
| No visual adapter | 0 | 118.7 PQ |
| No prompt tuning (2Embed) | 3 | 41.6 PQ |
This demonstrates the criticality of (1) BEiT-3’s layer-wise multiway fusion, (2) spatial adapters for adapting to dense-prediction, and (3) learnable prompt embeddings for open-vocabulary panoptic segmentation.
References
- Open-Vocabulary Panoptic Segmentation Using BERT Pre-Training of Vision-Language Multiway Transformer Model (Chen et al., 2024)