Page 407 - 《软件学报》2026年第5期
P. 407
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
2026,37(5):2286−2308 [doi: 10.13328/j.cnki.jos.007491] [CSTR: 32375.14.jos.007491] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
*
基于视觉 Transformer 的双视图融合细粒度图像识别
唐 昊, 李泽超, 蒋 鑫, 唐金辉
(南京理工大学 计算机科学与工程学院, 江苏 南京 210094)
通信作者: 李泽超, E-mail: zechao.li@njust.edu.cn
摘 要: 随着计算机视觉技术的不断进步, 细粒度图像识别在众多应用领域中发挥着重要作用. 与传统的粗粒度图
像识别不同, 细粒度图像识别着重于在同一大类别下对具有细微视觉差异的子类别进行精确划分, 因此该任务更
具有挑战性. 近年来, 视觉 Transformer 以其在全局上下文信息建模方面的出色表现而被广泛应用于图像识别领域.
然而, 当应用于细粒度图像识别任务时, 视觉 Transformer 在处理细节特征和背景噪声方面却存在一定的局限性.
针对上述问题, 提出一种基于视觉 Transformer 的双视图融合识别框架, 有效融合细粒度图像的全局视图与局部视
图以提升识别准确率. 该框架设计了一个基于注意力融合的冗余信息过滤模块, 在编码器内部通过层级注意力权
重的融合筛选图像块特征, 以优化全局视图的分类标记嵌入. 同时, 还设计了一个基于注意力阈值的关键区域定位
模块, 通过自适应阈值策略动态选定并放大全局视图中的关键区域, 形成细致的局部视图以供再次分析. 此外, 所
提出的局部区域特征自适应增强模块进一步增强了对局部细节的关注, 有效提升了细粒度特征的辨识能力. 为优
化此双视图融合框架, 提出了基于双视图相似度的对比损失函数和基于双视图置信度的自适应推理策略, 旨在增
强视觉 Transformer 模型输出的全局与局部特征辨识性, 同时有效节约计算资源并缩短推理时间. 在 CUB-200-
2011、Stanford Dogs、NABirds 和 iNaturalist2017 这 4 个公共数据集上的实验结果表明, 该方法相较于传统视觉
Transformer 模型在识别准确率上实现了显著提升, 展示了其在细粒度图像识别任务中的有效性和优越性.
关键词: 视觉 Transformer; 细粒度图像识别; 注意力机制; 对比学习; 特征表示; 数据增强
中图法分类号: TP391
中文引用格式: 唐昊, 李泽超, 蒋鑫, 唐金辉. 基于视觉Transformer的双视图融合细粒度图像识别. 软件学报, 2026, 37(5): 2286–2308.
http://www.jos.org.cn/1000-9825/7491.htm
英文引用格式: Tang H, Li ZC, Jiang X, Tang JH. Dual-view Fusion for Fine-grained Image Recognition with Vision Transformer.
Ruan Jian Xue Bao/Journal of Software, 2026, 37(5): 2286–2308 (in Chinese). http://www.jos.org.cn/1000-9825/7491.htm
Dual-view Fusion for Fine-grained Image Recognition with Vision Transformer
TANG Hao, LI Ze-Chao, JIANG Xin, TANG Jin-Hui
(School of Computer Science and Engineering, Nanjing University of Science and Technology, Nanjing 210094, China)
Abstract: With the continuous advancement of computer vision technology, fine-grained image recognition plays a crucial role across
various application domains. Unlike traditional coarse-grained image recognition, fine-grained image recognition aims to precisely
distinguish subcategories with subtle visual differences within the same major category, making this task particularly challenging. In recent
years, the vision Transformer has gained widespread adoption in image recognition due to its exceptional performance in modeling global
contextual information. However, the vision Transformer exhibits certain limitations when applied to fine-grained image recognition,
particularly in processing detailed features and mitigating background noise. To address these issues, this study proposes a dual-view
recognition framework based on the vision Transformer. This framework effectively integrates global and local views to enhance
recognition accuracy. In this framework, an attention-based fusion module is designed to filter redundant information and optimize the
classification token embedding of global views by merging and filtering patch features through hierarchical attention weights within the
encoder. In addition, an attention threshold-based key region localization module is introduced. This module dynamically selects and
* 基金项目: 国家自然科学基金 (62425603, U21B2043); 江苏省基础研究计划攀登项目 (BK20240011)
收稿时间: 2024-10-15; 修改时间: 2025-03-11; 采用时间: 2025-06-12; jos 在线出版时间: 2025-10-29
CNKI 网络首发时间: 2025-10-31

