Home

Awesome

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

python main.py 
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.

python main.py --non_CLIP
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.