Release of PromptSRC with pretrained models.

This commit is contained in:
uzair khattak
2023-07-13 23:43:31 +05:00
commit 8be7dcff6b
132 changed files with 106641 additions and 0 deletions

20
lpclip/feat_extractor.sh Normal file
View File

@@ -0,0 +1,20 @@
# sh feat_extractor.sh
DATA=/path/to/datasets
OUTPUT='./clip_feat/'
SEED=1
# oxford_pets oxford_flowers fgvc_aircraft dtd eurosat stanford_cars food101 sun397 caltech101 ucf101 imagenet
for DATASET in oxford_pets
do
for SPLIT in train val test
do
python feat_extractor.py \
--split ${SPLIT} \
--root ${DATA} \
--seed ${SEED} \
--dataset-config-file ../configs/datasets/${DATASET}.yaml \
--config-file ../configs/trainers/CoOp/rn50_val.yaml \
--output-dir ${OUTPUT} \
--eval-only
done
done