Awesome
Bayesian Prompt Learning for Image-Language Model Generalization
This repo contains the codebase of the ICCV'23 paper Bayesian Prompt Learning for Image-Language Model Generalization.
How to Install
This code is built on top of the awesome toolbox Dassl.pytorch so you need to install the dassl
environment first. Simply follow the instructions described here to install dassl
as well as PyTorch. After that, run pip install -r requirements.txt
under VPT/
to install a few more packages required by CLIP (this should be done when dassl
is activated). Then, you are ready to go.
Dataset Preparation
In this paper, we follow DATASETS.md to install the datasets. The task definition and few-shot learning setting are similar to following papers for fair comparison:
- Conditional Prompt Learning for Vision-Language Models, in CVPR, 2022.
- Learning to Prompt for Vision-Language Models, in IJCV, 2022.
How to Run
Click a paper below to see the detailed instructions on how to run the code to reproduce the results.
Results
The raw numerical results can be found at this google drive link.
Citation
If you use this code in your research, please kindly cite the following papers
@article{derakhshani2023variational,
title={Bayesian Prompt Learning for Image-Language Model Generalization},
author={Derakhshani, Mohammad Mahdi and Sanchez, Enrique and Bulat, Adrian and da Costa, Victor Guilherme Turrisi and Snoek, Cees GM and Tzimiropoulos, Georgios and Martinez, Brais},
journal={ICCV},
year={2023}
}