How well does CLIP understand texture?

Chenyun Wu, Subhransu Maji · DOI

Abstract

We investigate how well CLIP understands texture in natural images described by natural language. To this end, we analyze CLIP's ability to: (1) perform zero-shot learning on various texture and material classification datasets; (2) represent compositional properties of texture such as red dots or yellow stripes on the Describable Texture in Detail(DTDD) dataset; and (3) aid fine-grained categorization of birds in photographs described by color and texture of their body parts.

Introduction

While Vision-Language Models (VLMs) like OpenAI’s CLIP are primarily recognized for their object-level classification prowess, their understanding of low-level visual properties like texture remains less explored. Texture—the "how" of an object's appearance (e.g., "swirly," "fibrous")—is a fundamental building block of vision, critical for fine-grained classification and compositional world descriptions. This research evaluates whether CLIP’s massive pre-training translates into a deep understanding of visual textures and materials, or if it relies primarily on high-level object cues.

Methods and Datasets

The study evaluates CLIP across three dimensions:

  1. Zero-Shot Classification: Categorizing textures and materials using prompts like "a photo of a [category] pattern" across datasets such as DTD (Describable Texture Dataset), FMD (Flickr Material Dataset), and KTH-TIPS.
  2. Compositional Modeling: Using the DTD² dataset to analyze CLIP's handling of multi-attribute descriptions (e.g., "red polka-dots").
  3. Fine-Grained Categorization: Testing if texture and color descriptions of body parts (e.g., "yellow belly") improve zero-shot identification on the CUB-200-2011 dataset, particularly for species with obscure scientific names.

CLIP was compared against DTML, a specialized metric-learning baseline trained specifically on texture data.

Key Insights

Scaling and Robustness

Larger image encoders, such as ViT-L/14, proved more accurate and robust. Unlike smaller models, which were highly sensitive to specific prompt wording, larger models maintained consistent performance, reducing the need for extensive "prompt engineering."

Compositional Superiority

CLIP outperformed specialized models on rare combinations of colors and patterns. Its vast training data allows it to generalize to "weird" or infrequent textures better than models trained on smaller, domain-specific datasets.

Word cloud comparison between CLIP and DTML across various performance metrics.

Results

  • Material Classification: CLIP achieved a state-of-the-art 93.6% accuracy on the FMD, surpassing previous specialized models (~85%).
  • Bridging the Nomenclature Gap: On the CUB dataset, adding texture attributes to scientific names (which CLIP often fails to recognize) improved top-10 zero-shot accuracy from 24.9% to 56.6%. This suggests CLIP "knows" the visual features even without the specific Latin label.
  • Compositional Accuracy: CLIP showed a significant lead over DTML in "Two-colors" and "Color+Pattern" retrieval tasks on DTD².

Discussion: The Foreground Bias

A critical finding is CLIP's significant foreground bias. CLIP is heavily biased toward the center of the image. For instance, in a prompt asking for "blue," CLIP typically searches for a blue object (like a bird), whereas a specialized texture model like DTML is more likely to identify blue water in the background.

An example from the CUB-200-2011 dataset. CLIP's focus on the bird over background textures like water illustrates the 'foreground bias'.

Conclusion

CLIP possesses a remarkably strong and compositional understanding of texture, often exceeding the performance of specialized models. However, its inherent bias toward foreground objects limits its effectiveness in scenarios where background "stuff" is the primary focus. Future work should focus on mitigating this bias and extending texture-aware prompting to other specialized domains like fashion or biological identification.

Summary updated

BibTeX
@misc{wu2022how,
  author = {Chenyun Wu and Subhransu Maji},
  title = {{How well does CLIP understand texture?}},
  year = {2022},
  eprint = {2203.11449},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.11449},
}
Figure