This repository contains the implementation of the proposed MF-CLIP and the baseline methods. The implementation is based on a popular open-source tool, CoOp, which can be found at CoOp GitHub Repository. Follow the steps below to reproduce the results of MF-CLIP.
Please refer to DATASET.MD for dataset preparation instructions. After setting up the dataset, run the following scripts in order to reproduce MF-CLIP:
-
Finetune CLIP with Margin-based Loss
./scripts/finetune.sh
-
Train Generator
./scripts/unet.sh
-
Train Target Models
./scripts/train.sh
-
Evaluate Results
./scripts/eval.sh
-
Optional: Obtain Baseline Method Results
./scripts/baseline.sh