This folder contains the implementation of the PLOT method on adpaters.
This code is built on top of Tip-Adapter.
Following PLOT-CoOp to build the evironment of CoOp. Then, you can install other packages of PLOT-Adapter by running pip install -r requirements.txt in current folder.
Please follow the instructions DATASETS.md to construct the datasets.
Change the data root path in configs/dataset.yaml to your own path
Please feel free to download the cached models here. Extract the pretrained models of each datasets and put them into caches folder, whose structure is
plot-adapter
|–– caches
| |–– caltech101/
| | |–– shot1
| | |–– shot2
| | |–– shot4
| | |–– shot8
| | |–– shot16
| |–– dtd/
| | |–– shot1
| | |–– shot2
| | |–– shot4
| | |–– shot8
| | |–– shot16
For ImageNet dataset:
CUDA_VISIBLE_DEVICES=0,1,2,3 python main_imagenet.py --config configs/imagenet.yamlFor other 10 datasets:
CUDA_VISIBLE_DEVICES=0 python main.py --config configs/dataset.yaml