Skip to content
/ EVP Public

[TMLR'24] This repository includes the official implementation our paper "Unleashing the Power of Visual Prompting At the Pixel Level"

License

Notifications You must be signed in to change notification settings

UCSC-VLAA/EVP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unleashing the Power of Visual Prompting At the Pixel Level

This is the official implementation of the paper Unleashing the Power of Visual Prompting At the Pixel Level.

Installation

Clone this repo:

git clone https://github.com/UCSC-VLAA/EVP
cd EVP

Our code is built on:

torch>=1.10.1 torchvision>=0.11.2

Then install dependencies by:

pip install -r requirments.txt

pip install git+https://github.com/openai/CLIP.git

Data Preparation

See DATASET.md for detailed instructions and tips.

Train/Test for CLIP Model

  • Train the Enhanced Visual Prompting on CIFAR100:
python main.py 
  • Test the Enhanced Visual Prompting:
python main.py --evaluate

Train/Test for non-CLIP Model

We propose a simple pre-processing step to match the pre-trained classes and the downstream classes for non-CLIP model.

  • Train the Enhanced Visual Prompting for the non-CLIP Model:
python main.py --non_CLIP
  • Test the Enhanced Visual Prompting for the non-CLIP Model:
python main.py --non_CLIP --evaluate 

Citation

@article{wu2024evp,
  title   = {Unleashing the Power of Visual Prompting At the Pixel Level}, 
  author  = {Wu, Junyang and Li, Xianhang and Wei, Chen and Wang, Huiyu and Yuille, Alan and Zhou, Yuyin and Xie, Cihang},
  journal = {TMLR},
  year    = {2024}
}

Contact

Junyang Wu

Xianhang Li

If you have any question about the code and data, please contact us directly.

About

[TMLR'24] This repository includes the official implementation our paper "Unleashing the Power of Visual Prompting At the Pixel Level"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages