Adapting Vision-Language Models to Open Classes via Test-Time Prompt Tuning

Zhengqing Gao, Xiang Ao, Xu-Yao Zhang, Cheng-Lin Liu
8/29/2024
cs.CV

Official code: gaozhengqing/TTPT (3 stars, MIT, last commit 2024-08-30).

Abstract

Adapting pre-trained models to open classes is a challenging problem in machine learning. Vision-language models fully explore the knowledge of text modality, demonstrating strong zero-shot recognition performance, which is naturally suited for various open-set problems. More recently, some research focuses on fine-tuning such models to downstream tasks. Prompt tuning methods achieved huge improvements by learning context vectors on few-shot data. However, through the evaluation under open-set adaptation setting with the test data including new classes, we find that there exists a dilemma that learned prompts have worse generalization abilities than hand-crafted prompts. In this paper, we consider combining the advantages of both and come up with a test-time prompt tuning approach, which leverages the maximum concept matching (MCM) scores as dynamic weights to generate an input-conditioned prompt for each image during test. Through extensive experiments on 11 different datasets, we show that our proposed method outperforms all comparison methods on average considering both base and new classes. The code is available at https://github.com/gaozhengqing/TTPT

View on arXivView PDF

Code Implementations(1)

gaozhengqing/TTPTOfficial100%
MIT

PyTorch implementation of our PRCV 2024 paper "Adapting Vision-Language Models to Open Classes via Test-Time Prompt Tuning"

30Shell, PythonAug 30, 20242 years agoMIT
foundation-modelsmultimodal-learningprompt-learning

Similar Papers

Cite this paper

@article{gao2024adapting,
  title  = {Adapting Vision-Language Models to Open Classes via Test-Time Prompt Tuning},
  author = {Zhengqing Gao and Xiang Ao and Xu-Yao Zhang and Cheng-Lin Liu},
  year   = {2024},
  eprint = {2408.16486},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.16486v1}
}

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/2408.16486.svg)](https://codeofpaper.com/paper/2408.16486)

Discussion