A Comparative Survey of Vision Transformers for Feature Extraction in Texture Analysis
Leonardo Scabini, Andre Sacilotti, Kallil M. Zielinski, Lucas C. Ribas, Bernard De Baets, Odemir M. Bruno
TL;DR
The paper addresses texture analysis by evaluating 21 pre-trained Vision Transformer (ViT) variants as fixed-feature extractors for texture recognition, comparing them to hand-engineered methods and CNN baselines. It uses the ViT class embedding, no fine-tuning, and trains linear classifiers on extracted features, benchmarking across datasets including Outex, DTD, FMD, and KTH-TIPS2-b to assess robustness to rotation, scale, illumination, and in-the-wild conditions. A key finding is that ViTs, especially with strong pretraining such as IN-21k or self-supervised methods like DINO and BeiT v2, generally outperform baselines, with patch embeddings and self-supervised training being critical for texture discrimination; however, efficiency remains a trade-off, with some mobile variants offering better real-world practicality and larger models achieving higher throughput on GPUs. The work provides attention-map analyses to interpret model focus and highlights the potential of ViTs as a paradigm shift in texture feature extraction, while calling for optimized architectures and aggregation techniques tailored to texture tasks.
Abstract
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.
