NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CLIP-DIY: CLIP Dense Inference Yields Open-Vocabulary Semantic Segmentation For-Free

Monika Wysoczanska, Michaël Ramamonjisoa, Tomasz Trzcinski, Oriane Siméoni

Abstract

Semantic segmentation traditionally requires extensive pixel-level annotations and is limited to a fixed set of categories. CLIP-DIY overcomes these hurdles by repurposing the CLIP Vision-Language Model for dense prediction tasks without any additional training or fine-tuning. By combining multi-scale patch inference with unsupervised objectness guidance, CLIP-DIY achieves a new state-of-the-art in zero-shot segmentation on PASCAL VOC and demonstrates robust open-vocabulary capabilities.

Introduction

The emergence of Vision-Language Models (VLMs) like CLIP has transformed image-level classification, yet their application to dense, pixel-level tasks remains challenging. Standard adaptation techniques often involve architectural modifications or expensive fine-tuning on labeled masks. CLIP-DIY (Do-It-Yourself) addresses this by asking if a vanilla CLIP model can perform high-quality semantic segmentation "for free."

Methodology

The CLIP-DIY pipeline consists of two primary components designed to extract spatial information from a model trained on global image-text pairs.

Multi-scale Dense Inference

To obtain dense predictions, the input image is partitioned into grids at multiple resolutions. Each patch is processed independently by the CLIP image encoder. The resulting embeddings are compared against text embeddings of target class prompts (e.g., "a photo of a [class]") using cosine similarity. Aggregating these scores across scales allows the model to capture both global context and fine-grained boundary details.

The CLIP-DIY pipeline: Multi-scale encoding combined with dense similarity extraction and objectness-guided segmentation.

Guided Segmentation

A common failure mode for CLIP in dense tasks is "contextual hallucination"—assigning labels to background pixels that frequently co-occur with objects (e.g., labeling grass as "sheep"). To mitigate this, CLIP-DIY incorporates an unsupervised foreground/background segmenter (such as FOUND) to generate a class-agnostic "objectness" map. This map acts as a spatial prior, weighting CLIP's predictions to ensure semantic labels are only assigned to regions likely to contain actual objects.

Experimental Results

The method was evaluated in a zero-shot setting on the PASCAL VOC 2012 and COCO Object benchmarks.

  • PASCAL VOC 2012: CLIP-DIY achieved a mean Intersection-over-Union (mIoU) of 59.9, surpassing the previous state-of-the-art (TCL) by nearly 5 points.
  • COCO Object: The model reached 31.0 mIoU, demonstrating competitive performance against supervised and more complex zero-shot alternatives.

Qualitatively, CLIP-DIY produces cleaner segmentation masks with fewer artifacts than its predecessors. Its open-vocabulary nature allows it to segment diverse objects and landmarks not typically found in standard datasets.

Qualitative results demonstrating open-vocabulary segmentation of complex landmarks like the Eiffel Tower and Sacré-Cœur.

Discussion and Limitations

While CLIP-DIY eliminates the need for training, it inherits certain limitations from its base components. The model's accuracy is bounded by the performance of the unsupervised saliency map; if the initial segmenter fails to detect an object, CLIP-DIY cannot classify it. Additionally, linguistic ambiguities in prompts can lead to misclassification. Future work may explore more advanced fusion techniques for multi-scale features or improved unsupervised localization priors.

Conclusion

CLIP-DIY demonstrates that pre-trained VLMs possess significant latent spatial knowledge. By simply querying the model at multiple scales and applying a basic objectness prior, one can achieve state-of-the-art open-vocabulary segmentation without the need for a single pixel-level label or a single gradient update.

Summary updated

BibTeX
@inproceedings{wysoczanska2024clip,
  author = {Monika Wysoczanska and Michaël Ramamonjisoa and Tomasz Trzcinski and Oriane Siméoni},
  title = {{CLIP-DIY: CLIP Dense Inference Yields Open-Vocabulary Semantic Segmentation For-Free}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00143},
}
Figure