Compound Text-Guided Prompt Tuning via Image-Adaptive Cues

Hao Tan, Jun Li, Yizhuang Zhou, Jun Wan, Zhen Lei +1 more
12/11/2023
cs.CV

Official code: EricTan7/TGP-T (31 stars, last commit 2024-04-01).

Abstract

Vision-Language Models (VLMs) such as CLIP have demonstrated remarkable generalization capabilities to downstream tasks. However, existing prompt tuning based frameworks need to parallelize learnable textual inputs for all categories, suffering from massive GPU memory consumption when there is a large number of categories in the target dataset. Moreover, previous works require to include category names within prompts, exhibiting subpar performance when dealing with ambiguous category names. To address these shortcomings, we propose Compound Text-Guided Prompt Tuning (TGP-T) that significantly reduces resource demand while achieving superior performance. We introduce text supervision to the optimization of prompts, which enables two benefits: 1) releasing the model reliance on the pre-defined category names during inference, thereby enabling more flexible prompt generation; 2) reducing the number of inputs to the text encoder, which decreases GPU memory consumption significantly. Specifically, we found that compound text supervisions, i.e., category-wise and content-wise, is highly effective, since they provide inter-class separability and capture intra-class variations, respectively. Moreover, we condition the prompt generation on visual features through a module called Bonder, which facilitates the alignment between prompts and visual features. Extensive experiments on few-shot recognition and domain generalization demonstrate that TGP-T achieves superior performance with consistently lower training costs. It reduces GPU memory usage by 93% and attains a 2.5% performance gain on 16-shot ImageNet. The code is available at https://github.com/EricTan7/TGP-T.

View on arXivView PDF

Code Implementations(1)

EricTan7/TGP-TOfficial100%

[AAAI2024] Official implementation of TGP-T

310Shell, Python2 years ago

Similar Papers

Cite this paper

@article{tan2023compound,
  title  = {Compound Text-Guided Prompt Tuning via Image-Adaptive Cues},
  author = {Hao Tan and Jun Li and Yizhuang Zhou and Jun Wan and Zhen Lei and Xiangyu Zhang},
  year   = {2023},
  eprint = {2312.06401},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.06401v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.06401.svg)](https://codeofpaper.com/paper/2312.06401)

Discussion