GenMask: Adapting DiT for Segmentation via Direct Mask Generation
Organizations: Cooperative Medianet Innovation Center, Shanghai Jiao Tong University · Alibaba Group · School of Artificial Intelligence, Shanghai Jiao Tong University · Institute of Artificial Intelligence for Medicine, Shanghai Jiao Tong University School of Medicine
Abstract
Recent approaches for segmentation have leveraged pretrained generative models as feature extractors, treating segmentation as a downstream adaptation task via indirect feature retrieval. This implicit use suffers from a fundamental misalignment in representation. It also depends heavily on indirect feature extraction pipelines, which complicate the workflow and limit adaptation. In this paper, we argue that instead of indirect adaptation, segmentation tasks should be trained directly in a generative manner. We identify a key obstacle to this unified formulation: VAE latents of binary masks are sharply distributed, noise robust, and linearly separable, distinct from natural image latents. To bridge this gap, we introduce timesteps sampling strategy for binary masks that emphasizes extreme noise levels for segmentation and moderate noise for image generation, enabling harmonious joint training. We present GenMask, a DiT trains to generate black-and-white segmentation masks as well as colorful images in RGB space under the original generative objective. GenMask preserves the original DiT architecture while removing the need of feature extraction pipelines tailored for segmentation tasks. Empirically, GenMask attains state-of-the-art performance on referring and reasoning segmentation benchmarks and ablations quantify the contribution of each component.
Figures & tables
| Method | RefCOCO | RefCOCO+ | RefCOCO-g |
| test A / B | test A / B | val / test | |
| Metric: oIoU | |||
| CRIS [ 71 ] | 71.5 / 62.2 | 64.1 / 48.4 | 56.6 / 57.4 |
| VLT [ 15 ] | 76.0 / 69.6 | 68.4 / 56.9 | 63.5 / 66.2 |
| LAVT [ 87 ] | 75.8 / 68.8 | 68.4 / 55.1 | 61.2 / 62.1 |
| BKINet [ 14 ] | 76.4 / 69.4 | 69.9 / 53.4 | 64.2 / 63.8 |
| Model | Val Set | Test Set | ||
|---|---|---|---|---|
| gIoU | cIoU | gIoU | cIoU | |
| SEEM [ 95 ] | 25.5 | 21.2 | 24.3 | 18.7 |
| Grounded SAM [ 58 ] | 26.0 | 14.5 | 21.3 | 16.4 |
| OVSeg [ 33 ] | 28.5 | 18.6 | 26.1 | 20.8 |
| GLaMM [ 56 ] | 47.4 | 47.2 | – | – |
| SAM4MLLM [ 10 ] | 46.7 | 48.1 | – | – |
| value | RefCOCO | RefCOCO+ | RefCOCO-g | |||
|---|---|---|---|---|---|---|
| mIoU | oIoU | mIoU | oIoU | mIoU | oIoU | |
| 0.05 | 82.2 | 81.3 | 75.8 | 73.5 | 77.7 | 76.0 |
| 0.1 | 78.1 | 77.6 | 69.3 | 68.1 | 73.7 | 72.3 |
| 0.5 | 66.0 | 66.0 | 52.7 | 53.3 | 57.5 | 56.6 |
| Loss | RefCOCO | RefCOCO+ | RefCOCO-g | |||
|---|---|---|---|---|---|---|
| mIoU | oIoU | mIoU | oIoU | mIoU | oIoU | |
| MSE | 82.2 | 81.3 | 75.8 | 73.5 | 77.7 | 76.0 |
| BCE | 78.1 | 77.6 | 73.1 | 70.3 | 75.0 | 72.2 |
| BCE w/ linear | 81.3 | 80.4 | 74.8 | 72.4 | 76.9 | 75.0 |
| Gen data | RefCOCO | RefCOCO+ | RefCOCO-g | |||
|---|---|---|---|---|---|---|
| mIoU | oIoU | mIoU | oIoU | mIoU | oIoU | |
| 82.2 | 81.3 | 75.8 | 73.5 | 77.7 | 76.0 | |
| 81.0 | 80.6 | 74.2 | 72.4 | 76.7 | 75.0 | |
| VAE | RefCOCO | RefCOCO+ | RefCOCO-g | |||
|---|---|---|---|---|---|---|
| mIoU | oIoU | mIoU | oIoU | mIoU | oIoU | |
| 82.2 | 81.3 | 75.8 | 73.5 | 77.7 | 76.0 | |
| 74.1 | 73.2 | 68.8 | 67.6 | 72.4 | 71.1 | |
Image Segmentation
Image segmentation assigns pixels or voxels to objects and regions, supporting measurement, scene understanding, and decisions across image domains.
See all 399 papers