How well does CLIP understand texture?

Chenyun Wu, Subhransu Maji

TL;DR

This paper evaluates how well OpenAI’s CLIP model understands texture and materials in natural images using zero-shot learning. The authors find that while CLIP performs remarkably well—even outperforming domain-specific models on rare compositional textures—it suffers from a significant "foreground bias," often ignoring background textures in favor of central objects.

What Problem Does This Paper Address?

Vision-language models like CLIP have shown incredible generalization across general object recognition tasks. However, their understanding of texture—the fine-grained "stuff" things are made of—remains less understood. Texture is critical for identifying materials (wood vs. plastic) and distinguishing between similar species in fine-grained domains (like birds).

The authors investigate whether CLIP’s massive pre-training on 400 million image-text pairs has instilled a nuanced understanding of texture vocabulary (e.g., "banded," "fibrous," "polka-dotted") and whether it can handle compositional descriptions like "red dots on a yellow background."

Methods

The researchers evaluated several CLIP variants (ResNet and Vision Transformer backbones) across three main experimental setups:

  1. Zero-shot Classification: Testing CLIP on standard texture and material datasets using prompts like "a photo of a [category] pattern."
  2. Compositional Analysis: Comparing CLIP against a specialized baseline, DTML (Describable Texture Metric Learning), on the DTD² dataset to see how well it handles multi-attribute descriptions.
  3. Attribute-based Bird Classification: Using texture and color attributes of bird body parts (e.g., "red head," "spotted wing") to improve zero-shot classification on the CUB dataset, especially when common names are replaced with rare scientific names.

Datasets

The study utilized a diverse set of benchmarks:

  • DTD (Describable Textures Dataset): 47 categories of texture attributes.
  • FMD (Flickr Material Dataset): 10 material categories (e.g., wood, glass).
  • KTH-TIPS & KTH-TIPS2a: Materials under varying lighting and scale.
  • DTD²: An extension of DTD with rich, natural language descriptions for each image.
  • CUB-200-2011: A fine-grained dataset of 200 bird species with detailed part-based attributes.

Key Insights and Ideas

  • Scale and Architecture Matter: Vision Transformers (ViT) consistently outperformed ResNet backbones. The largest model, ViT-L/14@336, achieved the best results, suggesting that high-resolution inputs are vital for capturing fine texture details.
  • Compositional Strength: CLIP excels at recognizing rare combinations of colors and patterns (e.g., "pink stripes") where domain-specific models often fail due to limited training data.
  • The "Foreground Bias": A major finding is that CLIP is highly object-centric. In retrieval tasks, it tends to associate attributes with the central foreground object, often failing to recognize textures in the background (e.g., water or foliage).
  • Vocabulary Nuance: CLIP is better at recognizing materials (wood, marble) and rare colors (orange, purple) than it is at describing specific geometric patterns like "lined" or "grooved," which are more common in traditional texture datasets.
Word clouds showing CLIP's best-performing attributes (left) vs. the DTML baseline (middle). CLIP excels at colors and materials.

Key Results

  • State-of-the-Art Zero-Shot: On the FMD material dataset, CLIP achieved 93.6% accuracy, significantly outperforming the previous state-of-the-art of ~85%. (The authors note this might be due to potential overlap between FMD and CLIP's massive training set).
  • Boosting Fine-Grained Accuracy: On the CUB bird dataset, when using scientific names (which CLIP rarely sees), the top-10 accuracy was only 24.9%. By adding 15 texture/color attributes to the prompt, accuracy soared to 56.6%.
  • Prompt Sensitivity: Smaller models (ViT-B/32) are much more sensitive to prompt wording than larger models. For larger models, "a photo of a [c] object" and "a photo of a [c] pattern" performed similarly well.
Examples of bird species and the automatically generated attribute-rich prompts used to boost classification accuracy.

Limitations and Future Work

The most prominent limitation is foreground bias. Because CLIP is trained on web images where text usually describes the main subject, it struggles to "see" the background. This makes it less suitable for applications requiring environmental context or non-central object analysis.

Additionally, the authors could not definitively rule out data leakage for some datasets (like FMD) because CLIP's training data is private. Future work could involve exploring how to mitigate foreground bias or applying these texture-aware prompts to other fine-grained domains like fashion, fungi, or mineralogy.

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