This repository contains the official PyTorch implementation of our paper Towards Fine-Grained Adaptation of CLIP via a Self-Trained Alignment Score.
-
Dataset paths are defined in
json_files/dataset_catalog.json.
You will need to update these paths to point to your local dataset locations. -
Dataset label files are provided in
json_files/classes.json. -
For dataset preparation, we recommend using the scripts from the VISSL repository.
Make sure to install the following dependencies:
torch >= 1.10.0timm == 0.4.12tensorboardXftfy
To train the FAIR model, use the following command:
python train.py --dataset [name_of_dataset] --train_config ours_base --reg_batchThis work builds upon the codebase of MUST.
We thank the authors for publicly releasing their implementation.
If you use FAIR or find it helpful, please consider citing our paper.