[论文解读] A Comparative Survey of Vision Transformers for Feature Extraction in Texture Analysis
本文通过迁移学习评估了21种视觉变换器(ViT)变体在纹理识别中的表现,采用冻结的预训练模型提取特征并结合线性分类器。ViT,特别是经过DINO预训练的ViT-B和BeiTv2,在纹理任务中优于卷积神经网络(CNNs)和人工设计的方法,尤其在野外纹理上表现更优,尽管FLOPs更高,但在GPU上的推理效率仍具竞争力或更优。
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.
研究动机与目标
- 评估预训练视觉变换器(ViTs)在纹理识别中的潜力,该领域传统上由CNN和人工设计模型主导。
- 在多种纹理识别任务下,比较ViTs与CNN及人工设计基线模型的表现,涵盖不同条件。
- 评估ViTs在特征提取中的效率,尤其与ResNet50相比,在真实GPU推理场景下的表现。
- 研究模型架构设计与预训练策略(如DINO、ImageNet-1k/21k)对ViT在纹理任务中性能的影响。
- 通过分析注意力图与模型行为,理解复杂纹理(含背景或多个物体)中的归纳偏差与注意力聚焦机制。
提出的方法
- 通过从21种预训练ViT变体中移除分类头并冻结其权重,采用迁移学习方法提取特征。
- 从每个ViT的分类令牌嵌入中提取特征,并在八个不同的纹理识别基准上训练线性分类器。
- 评估任务涵盖对旋转、尺度和光照变化的鲁棒性,以及对彩色纹理、材料纹理和纹理属性的区分能力。
- 在纹理复杂度各异的数据集上进行比较,包括野外图像(如DTD、FMD、KTH-2-b)和受控数据集(如Outex10、12)。
- 通过GPU上的特征提取时间衡量效率,比较ViTs(如ViT-B、BeiTv2)与ResNet50的性能,尽管前者FLOPs和参数量更高。
- 可视化注意力图以分析模型关注区域,特别是纹理区域与背景的对比,解释性能差异。
实验结果
研究问题
- RQ1在通过迁移学习进行特征提取时,视觉变换器能否在纹理识别任务中超越CNN和人工设计模型?
- RQ2不同的预训练策略(如DINO、ImageNet-1k/21k)如何影响ViT在纹理识别中的表现,特别是在领域偏移(如野外与受控纹理)下的表现?
- RQ3在GPU硬件上,ViT用于纹理特征提取时,性能与计算效率之间的权衡如何?
- RQ4ViT的注意力机制如何在纹理区域与背景之间进行定位,这种定位方式与识别性能有何关联?
- RQ5哪些ViT架构与设计选择(如Swin、EfficientFormer)在纹理分析中实现了准确率与效率的最佳平衡?
主要发现
- 经过DINO预训练的ViT-B在野外纹理数据集(如DTD、FMD、KTH-2-b)上达到最先进性能,优于ResNet50和人工设计基线。
- BeiTv2和基于Swin的ViTs在多个任务中表现优异,尤其在处理含背景和多物体的复杂纹理时表现突出。
- 尽管参数量和GFLOPs更高,ViT-B和BeiTv2在GPU上的特征提取时间仍快于ResNet50,表明其硬件利用率更优。
- 经过IN-21k预训练的ViTs在均匀纹理数据集(如Outex10和12)上表现更优,表明其对均匀图案具有更强的归纳偏差。
- 注意力可视化显示,DINO预训练的ViTs能有效聚焦于目标纹理,即使在杂乱场景中(如木纹背景中的玻璃纹理),而IN-21k模型有时会错误聚焦于纹理缺陷。
- EfficientFormer展现出低成本优势,性能与效率平衡良好,适用于资源受限的应用场景。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。