arrow
返回

Learning to Prompt for Vision-Language Models

delete2022-07-31
delete654
PRE
AI
K
Kaiyang Zhou *
J
Jingkang Yang
C
Chen Change Loy
Z
Ziwei Liu
DOI:10.1007/s11263-022-01653-1delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Large pre-trained vision-language models like CLIP have shown great potential in learning representations that are transferable across a wide range of downstream tasks. Different from the traditional representation learning that is based mostly on discretized labels, vision-language pre-training aligns images and texts in a common feature space, which allows zero-shot transfer to a downstream task via prompting, i.e., classification weights are synthesized from natural language describing classes of interest. In this work, we show that a major challenge for deploying such models in practice is prompt engineering, which requires domain expertise and is extremely time-consuming-one needs to spend a significant amount of time on words tuning since a slight change in wording could have a huge impact on performance. Inspired by recent advances in prompt learning research in natural language processing (NLP), we propose Context Optimization (CoOp), a simple approach specifically for adapting CLIP-like vision-language models for downstream image recognition. Concretely, CoOp models a prompt's context words with learnable vectors while the entire pre-trained parameters are kept fixed. To handle different image recognition tasks, we provide two implementations of CoOp: unified context and class-specific context. Through extensive experiments on 11 datasets, we demonstrate that CoOp requires as few as one or two shots to beat hand-crafted prompts with a decent margin and is able to gain significant improvements over prompt engineering with more shots, e.g., with 16 shots the average gain is around 15% (with the highest reaching over 45%). Despite being a learning-based approach, CoOp achieves superb domain generalization performance compared with the zero-shot model using hand-crafted prompts.

期刊

International Journal of Computer Vision 封面图
International Journal of Computer Vision
IF:
9.3
论文数:
4.0K
被引数:
2.8W

机构

N
Nanyang Technological University
学者数:
4.9W
论文数: 4.8W
被引数: 8.1W
引用论文

引用论文

Automated modal identification and tracking: Application to an iron arch bridge
err2016-02-28
err0
errOAAI
errAlessandro Cabboi; Filipe Magalhães; Carmelo Gentile; Álvaro Cunha
err分享
err收藏
High prevalence of malaria in a non-endemic setting among febrile episodes in travellers and migrants coming from endemic areas: a retrospective analysis of a 2013–2018 cohort
err2021-11-27
err0
errOAAI
errAlejandro Garcia-Ruiz de Morales; Covadonga Morcate; Elena Isaba-Ares; Ramon Perez-Tanoira; Jose A. Perez-Molina
err分享
err收藏
Ingestion of corrosive acids
err1989-09-01
err0
PREAI
errShowkat Ali Zargar; Rakesh Kochhar; Birender Nagi; Saroj Mehta; Satish Kumar Mehta
err分享
err收藏
err分享
err收藏
Improving the hepatitis cascade: assessing hepatitis testing and its management in primary health care in China
err2018-05-08
err0
errOAAI
errWilliam C W Wong; Ying-Ru Lo; Sunfang Jiang; Minghui Peng; Shanzhu Zhu; Michael R Kidd; Xia-Chun Wang; Po-Lin Chan; Jason J Ong
err分享
err收藏
The adsorption of monolayer coatings on iron nanoparticles: Mössbauer spectroscopy and XANES results
err1998-11-01
err0
PREAI
errG Kataby; Yu Koltypin; J Rothe; J Hormes; I Felner; X Cao; A Gedanken
err分享
err收藏
Role of simple descriptors and applicability domain in predicting change in protein thermostability
err2018-09-07
err0
errOAAI
errKenneth N. McGuinness; Weilan Pan; Robert P. Sheridan; Grant Murphy; Alejandro Crespo
err分享
err收藏
err分享
err收藏
学者 查看更多内容