Page 408 - 《软件学报》2026年第5期
P. 408
唐昊 等: 基于视觉 Transformer 的双视图融合细粒度图像识别 2287
magnifies key patches in the global view using an adaptive threshold strategy, forming detailed local views for further analysis.
Furthermore, an adaptive enhancement module for local region features is proposed to strengthen the focus on local details, thus enhancing
the recognition capability of fine-grained features. To optimize the dual-view framework, a contrastive loss function based on dual-view
similarity and an adaptive inference strategy based on dual-view confidence are proposed. These strategies aim to enhance the global and
local feature discriminability of the vision Transformer model while efficiently saving computational resources and shortening inference
time. Experimental results on the CUB-200-2011, Stanford Dogs, NABirds, and iNaturalist2017 public datasets demonstrate that the
proposed method achieves significant improvements in recognition accuracy compared to the traditional vision Transformer model. These
results validate the proposed method’s effectiveness and superiority in fine-grained image recognition tasks.
Key words: vision Transformer (ViT); fine-grained image recognition; attention mechanism; contrastive learning; feature representation; data
augmentation
随着计算机视觉技术 [1] 的迅猛发展, 图像识别已成为众多应用领域的核心技术, 应用范围从日常生活的图像
搜索和社交媒体标签, 扩展至更复杂的应用如医学图像分析和生物物种识别. 虽然常规图像识别已取得显著进步,
但细粒度图像识别 [2,3] 依然是一个颇具挑战性的研究领域. 不同于传统的粗粒度图像识别, 细粒度图像识别更加注
重在基础图像分类之上进行更精细的子类划分, 因此它在实际应用中有着广泛的需求, 相关的研究领域包括生物
多样性监测 [4] 、智慧交通 [5] 、智能零售 [6] 等. 然而, 正如图 1 所示, 细粒度图像识别面临着诸多复杂且具有挑战性
的问题, 主要包括: (1) 类内差异较大, 类间差异微小: 细粒度图像识别的一个核心特征是目标类别间的差异通常非
常细微, 而每个类别内部的差异则相对较大; (2) 标注难度大: 由于细粒度特征往往需要专业知识来识别, 获取高质
量的注释数据变得异常困难和昂贵; (3) 数据稀缺: 细粒度图像识别常面临着标注数据不足的问题, 这限制了深度
学习模型的性能和泛化能力. 鉴于传统的粗粒度图像识别模型难以应对复杂的细粒度图像识别任务, 因此, 实现低
成本、高效率的细粒度图像识别对学术界和工业界具有极其重要的意义.
赫氏带鹀 狐色雀鹀 白喉带鹀 田雀鹀
类
间
距
较
小
类内距较大
图 1 细粒度图像识别任务示意图
随着深度神经网络的快速发展, 通过卷积神经网络 (convolutional neural network, CNN) 提取的特征相较于传
[7]
统手工特征展现出更强的表达能力, 使得基于 CNN 的细粒度图像识别方法 [8−10] 日益成熟. 由于目标的关键局部部
分具有细微的差异, 加之 CNN 在全局特征学习方面存在局限性, 研究者们开始努力提升模型捕捉细微差异的能
力, 进而更准确地定位关键部位并丰富特征表示. 当前的研究主要聚焦于两个方向: (1) 通过计算高阶信息来构建
更具辨识性的特征表征, 以适应复杂的细粒度图像识别任务; (2) 通过采用注意力机制进行弱监督学习, 专注于具
有区分度的局部区域, 并从这些区域中提取局部细粒度特征进行识别. 尽管这些方法能够通过类别标签学习到具
有区分性的细粒度特征映射, 但它们普遍无法充分关注图像中某一局部区域内的细微差异. 此外, 在这些方法中,

