Skip to content
/ KCL Public

Implement of 'The Devil is in the Few Shots: Iterative Visual Knowledge Completion for Few-shot Learning'

Notifications You must be signed in to change notification settings

Mark-Sky/KCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datasets

Follow DATASET.md to install ImageNet and other 10 datasets referring to CoOp.

Running

You can modify the configurations in the configs/[dataset].yaml, including shots, learning rate, train epoch, etc. Here we provide the implementation of KCL on six transfer learning models including CLIP, CoOp, CLIPAdapter, Tip-Adapter, Tip-Adapter-F and MaPLe.

You can get the performance of the model without KCL by:

CUDA_VISIBLE_DEVICES=0 python main.py --config configs/[dataset].yaml --model=[model] --shots=k

For example,

CUDA_VISIBLE_DEVICES=0 python main.py --config configs/imagenet.yaml --model=CoOp --shots=1

You can run KCL by:

CUDA_VISIBLE_DEVICES=0 python main.py --config configs/[dataset].yaml --model=KCL[model] --shots=k

For example,

CUDA_VISIBLE_DEVICES=0 python main.py --config configs/imagenet.yaml --model=KCLCoOp --shots=1

Contact

Please contact [email protected] if you have any question about this project

About

Implement of 'The Devil is in the Few Shots: Iterative Visual Knowledge Completion for Few-shot Learning'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages