[Paper Review] A Comparative Survey of Vision Transformers for Feature Extraction in Texture Analysis
This paper evaluates 21 Vision Transformer (ViT) variants for texture recognition using transfer learning, extracting features via frozen pre-trained models and linear classifiers. ViTs, especially ViT-B with DINO pre-training and BeiTv2, outperform CNNs and hand-engineered methods on texture tasks—particularly with in-the-wild textures—while demonstrating competitive or superior inference efficiency on GPUs despite higher FLOPs.
Texture, a significant visual attribute in images, has been extensively investigated across various image recognition applications. Convolutional Neural Networks (CNNs), which have been successful in many computer vision tasks, are currently among the best texture analysis approaches. On the other hand, Vision Transformers (ViTs) have been surpassing the performance of CNNs on tasks such as object recognition, causing a paradigm shift in the field. However, ViTs have so far not been scrutinized for texture recognition, hindering a proper appreciation of their potential in this specific setting. For this reason, this work explores various pre-trained ViT architectures when transferred to tasks that rely on textures. We review 21 different ViT variants and perform an extensive evaluation and comparison with CNNs and hand-engineered models on several tasks, such as assessing robustness to changes in texture rotation, scale, and illumination, and distinguishing color textures, material textures, and texture attributes. The goal is to understand the potential and differences among these models when directly applied to texture recognition, using pre-trained ViTs primarily for feature extraction and employing linear classifiers for evaluation. We also evaluate their efficiency, which is one of the main drawbacks in contrast to other methods. Our results show that ViTs generally outperform both CNNs and hand-engineered models, especially when using stronger pre-training and tasks involving in-the-wild textures (images from the internet). We highlight the following promising models: ViT-B with DINO pre-training, BeiTv2, and the Swin architecture, as well as the EfficientFormer as a low-cost alternative. In terms of efficiency, although having a higher number of GFLOPs and parameters, ViT-B and BeiT(v2) can achieve a lower feature extraction time on GPUs compared to ResNet50.
Motivation & Objective
- To assess the potential of pre-trained Vision Transformers (ViTs) in texture recognition, a domain where CNNs and hand-engineered models have traditionally dominated.
- To compare ViTs against CNNs and hand-engineered baselines across multiple texture recognition tasks under varying conditions.
- To evaluate the efficiency of ViTs in feature extraction, especially in comparison to ResNet50, under real-world GPU inference scenarios.
- To investigate how architectural design and pre-training regime (e.g., DINO, ImageNet-1k/21k) influence ViT performance on texture tasks.
- To analyze attention maps and model behavior on complex textures with backgrounds or multiple objects to understand inductive biases and attention focus.
Proposed method
- The study employs transfer learning by removing the classification head from 21 pre-trained ViT variants and freezing their weights to extract features.
- Features are extracted from the class token embedding of each ViT and used to train linear classifiers on eight distinct texture recognition benchmarks.
- The evaluation includes tasks measuring robustness to rotation, scale, and illumination changes, as well as discrimination of color textures, material textures, and texture attributes.
- Models are compared across datasets with varying texture complexity, including in-the-wild images (e.g., DTD, FMD, KTH-2-b) and controlled datasets (e.g., Outex10, 12).
- Efficiency is measured via feature extraction time on GPUs, comparing ViTs (e.g., ViT-B, BeiTv2) against ResNet50, despite higher GFLOPs and parameter counts.
- Attention maps are visualized to analyze model focus, particularly on textured regions versus backgrounds, to explain performance differences.
Experimental results
Research questions
- RQ1Can Vision Transformers outperform CNNs and hand-engineered models in texture recognition tasks when used for feature extraction via transfer learning?
- RQ2How do different pre-training regimes (e.g., DINO, ImageNet-1k/21k) affect ViT performance on texture recognition, especially under domain shift (e.g., in-the-wild vs. controlled textures)?
- RQ3What is the trade-off between model performance and computational efficiency in ViTs for texture feature extraction, particularly on GPU hardware?
- RQ4How do ViT attention mechanisms localize on texture regions compared to backgrounds, and how does this correlate with recognition performance?
- RQ5Which ViT architectures and design choices (e.g., Swin, EfficientFormer) offer the best balance of accuracy and efficiency for texture analysis?
Key findings
- ViT-B with DINO pre-training achieves state-of-the-art performance on in-the-wild texture datasets such as DTD, FMD, and KTH-2-b, outperforming ResNet50 and hand-engineered baselines.
- BeiTv2 and Swin-based ViTs also demonstrate strong performance across multiple tasks, especially in handling complex textures with backgrounds and multiple objects.
- Despite higher parameter counts and GFLOPs, ViT-B and BeiTv2 exhibit faster feature extraction times on GPUs than ResNet50, indicating better hardware utilization.
- ViTs with IN-21k pre-training show superior performance on homogeneous texture datasets like Outex10 and 12, suggesting stronger inductive bias for uniform patterns.
- Attention visualization reveals that DINO-pretrained ViTs focus effectively on target textures even in cluttered scenes (e.g., glass texture in a background of wood), while IN-21k models sometimes misfocus on texture defects.
- The EfficientFormer emerges as a low-cost alternative, balancing performance and efficiency, making it suitable for resource-constrained applications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.