label_filename: File path of the CSV annotation file under the base folder indata_roottext_type: Text type of annotations for test examples. String, defaultasis.task_type: retrieve: retrieve image embeddings from image encoder; eval: evaluate with pickle file containing image embeddings; all: evaluate from scratch which both retrieve image embeddings and evaluate the embeddings in one run. String, options: "retrieve", "eval", "all", defaultall.feature-file: Optional pickle file with cached image embeddings for eval-only runs withclassification.py.classification-tasks: Which classification evaluators to run from the shared image features. Options:zero_shot,few_shot. Default runs both.nfold: The number of times of sampling training examples during few-shot.int, default 5.kshot_list: A list of integers for k in k-shot. Default [1,5].data_root: File path of base folder which contains images and a CSV annotation file. String, default ''.logs: Where to store logs. Use None or 'none' to avoid storing logs. String, default None.name: Optional identifier for the experiment when storing logs. Otherwise use current time. String, default None.workers: Number of dataloader workers per GPU.intvalue, default 1.batch-size: Batch size per GPU.intvalue, default 64.precision: Floating point precision. Options: "amp", "amp_bf16", "amp_bfloat16", "bf16", "fp32". Defaultamp.model: Name of the vision backbone to use. String, default "ViT-B-16".pretrained: Use a pretrained CLIP model weights with the specified tag or file path. If runningfew-shot.pywithtask_type=eval, use this parameter as the pickle file path. Default "openai".pretrained-image: Load imagenet pretrained weights for image tower backbone if available. Default False.image-mean: Override default image mean value of dataset.floatvalue, default None.image-std: Override default image std deviation of of dataset.floatvalue, default None.aug-cfgforce-image-size: Override default image size.intvalue, default None.force-quick-gelu: Force use of QuickGELU activation for non-OpenAI transformer models. Default is False.force-custom-text: Force use of CustomTextCLIP model (separate text-tower). Default is False.torchscript:torch.jit.scriptthe model, also usesjitversion of OpenAI models ifpretrained=='openai'. Default is False.trace:torch.jit.tracethe model for inference / eval only. Default is False.debug: If true, more information is logged. Default is False.no-set-device-rank: Don't set device index from local rank (when CUDA_VISIBLE_DEVICES restricted to one per proc). Default is False.lr: Set the learning rate. Default is 1e-4.epochs: Number of epochs to train for. Default is 100.n_repeats: Number of times to repeat for simpleshot. Default is 5.eval_every: Set n: Evaluate every n epochs and log evaluation. Default is 10.seed: Default random seed, defaults to 0.
Use python -m src.evaluation.classification to run zero-shot and few-shot evaluation from a single image feature extraction pass.