-
Notifications
You must be signed in to change notification settings - Fork 84
/
test.sh
executable file
·30 lines (22 loc) · 985 Bytes
/
test.sh
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
devices=${1:-0}
pred_root=${2:-e_preds}
# Inference
CUDA_VISIBLE_DEVICES=${devices} python inference.py --pred_root ${pred_root}
echo Inference finished at $(date)
# Evaluation
log_dir=e_logs && mkdir ${log_dir}
task=$(python3 config.py)
case "${task}" in
"DIS5K") testsets='DIS-VD,DIS-TE1,DIS-TE2,DIS-TE3,DIS-TE4' ;;
"COD") testsets='CHAMELEON,NC4K,TE-CAMO,TE-COD10K' ;;
"HRSOD") testsets='DAVIS-S,TE-HRSOD,TE-UHRSD,DUT-OMRON,TE-DUTS' ;;
"General") testsets='DIS-VD,TE-P3M-500-NP' ;;
"General-2K") testsets='DIS-VD,TE-P3M-500-NP' ;;
"Matting") testsets='TE-AM-2k' ;;
esac
testsets=(`echo ${testsets} | tr ',' ' '`) && testsets=${testsets[@]}
for testset in ${testsets}; do
# python eval_existingOnes.py --pred_root ${pred_root} --data_lst ${testset} > ${log_dir}/eval_${testset}.out
nohup python eval_existingOnes.py --pred_root ${pred_root} --data_lst ${testset} > ${log_dir}/eval_${testset}.out 2>&1 &
done
echo Evaluation started at $(date)