Skip to content

amirziai/rafic

Repository files navigation

Retrieval-Augmented Few-shot Image Classification (RAFIC)

Stanford CS330 project

Baseline

Baselines

from rafic import experiments as exp

res = dict()
for dataset in ("birds", "aircraft"):
  res[dataset] = dict(
    zs=exp.zero_shot_text_label(dataset_name=dataset),
    lr=exp.logistic_regression(dataset_name=dataset),
  )  

Experiments

bash exp1.sh
bash exp2.sh
bash exp3.sh

Env

  • Install the conda env
  • pip install -r requirements.txt
  • Install CLIP: pip install git+https://github.com/openai/CLIP.git

Data

  • rafic/config.py has a list of all the required data files
  • Download from GDrive and place things in the appropriate folders

About

Stanford CS330 project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published