Skip to content

[ICCV 2023] Bayesian Prompt Learning for Image-Language Model Generalization

License

Notifications You must be signed in to change notification settings

saic-fi/Bayesian-Prompt-Learning

Repository files navigation

Bayesian Prompt Learning for Image-Language Model Generalization

Variational Prompt Learning

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:

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}
}

About

[ICCV 2023] Bayesian Prompt Learning for Image-Language Model Generalization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published