File size: 812 Bytes
f76d30f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
#!/bin/bash
# Usage: see example script below.
# bash run_scripts/zeroshot_eval.sh 0 \
# ${path_to_dataset} ${dataset_name} \
# ViT-B-16 RoBERTa-wwm-ext-base-chinese \
# ${ckpt_path}
# only supports single-GPU inference
export CUDA_VISIBLE_DEVICES=${1}
export PYTHONPATH=${PYTHONPATH}:`pwd`/QA-CLIP-main
path=${2}
dataset=${3}
datapath=${path}
savedir=`pwd`/save_predictions
vision_model=${4} # ViT-B-16
text_model=${5}
resume=${6}
label_file=`pwd`/label_cn.txt
index=${7:-}
mkdir -p ${savedir}
python -u eval/zeroshot_evaluation.py \
--datapath="${datapath}" \
--label-file=${label_file} \
--save-dir=${savedir} \
--dataset=${dataset} \
--index=${index} \
--img-batch-size=64 \
--resume=${resume} \
--vision-model=${vision_model} \
--text-model=${text_model} |