arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2304.06385cs.CV
收藏

TransHP:基于层级提示的图像分类

TransHP: Image Classification with Hierarchical Prompting

University of Technology Sydney(悉尼科技大学);Baidu Inc.(百度公司);Zhejiang University(浙江大学)

Wenhao Wang, Yifan Sun, Wei Li, Yi Yang

AI总结:

TransHP通过层级提示机制,将祖先类信息注入Transformer中间特征,提升层级图像分类的准确率、数据效率和可解释性。

摘要:

本文针对层级图像分类(HIC)任务,探索了一种层级提示机制。与以往的HIC方法不同,我们的层级提示是首个将祖先类信息作为标记化提示显式注入,以利于后代类区分的方法。我们认为这很好地模仿了人类的视觉识别过程,即人类可能利用祖先类作为提示,将注意力集中于后代类之间的细微差异。我们将这种提示机制建模为带有层级提示的Transformer(TransHP)。TransHP包含三个步骤:1)学习一组提示标记来表示粗粒度(祖先)类;2)在中间模块实时预测输入图像的粗粒度类;3)将预测的粗粒度类的提示标记注入中间特征。尽管TransHP的参数对所有输入图像保持不变,但注入的粗粒度类提示会调节(修改)后续的特征提取,并鼓励对后代类之间相对细微的差异进行动态关注。大量实验表明,TransHP在分类准确率(例如,将ViT-B/16的ImageNet分类准确率提升+2.83%)、训练数据效率(例如,在10%的ImageNet训练数据下提升+12.69%)以及模型可解释性方面均有所改善。此外,TransHP在性能上也优于以往的HIC方法,表明TransHP很好地利用了层级信息。代码可在 https://github.com/WangWenhao0716/TransHP 获取。

英文摘要:

This paper explores a hierarchical prompting mechanism for the hierarchical image classification (HIC) task. Different from prior HIC methods, our hierarchical prompting is the first to explicitly inject ancestor-class information as a tokenized hint that benefits the descendant-class discrimination. We think it well imitates human visual recognition, i.e., humans may use the ancestor class as a prompt to draw focus on the subtle differences among descendant classes. We model this prompting mechanism into a Transformer with Hierarchical Prompting (TransHP). TransHP consists of three steps: 1) learning a set of prompt tokens to represent the coarse (ancestor) classes, 2) on-the-fly predicting the coarse class of the input image at an intermediate block, and 3) injecting the prompt token of the predicted coarse class into the intermediate feature. Though the parameters of TransHP maintain the same for all input images, the injected coarse-class prompt conditions (modifies) the subsequent feature extraction and encourages a dynamic focus on relatively subtle differences among the descendant classes. Extensive experiments show that TransHP improves image classification on accuracy (e.g., improving ViT-B/16 by +2.83% ImageNet classification accuracy), training data efficiency (e.g., +12.69% improvement under 10% ImageNet training data), and model explainability. Moreover, TransHP also performs favorably against prior HIC methods, showing that TransHP well exploits the hierarchical information. The code is available at: https://github.com/WangWenhao0716/TransHP.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑