File size: 706 Bytes
f9561b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# [Usage] bash val.sh [$config_file] [$weight_file] [$(gf/vat)]; e.g.
# bash val.sh configs/gazefollow_518.py output/gazefollow_518/model_final.pth gf
# bash val.sh configs/videoattentiontarget.py output/videoattentiontarget/model_final.pth vat

config_file="$1"
checkpoint="$2"

if [ "$3" = "gf" ]; then
    evaluater="tools/eval_on_gazefollow.py"
elif [ "$3" = "vat" ]; then
    evaluater="tools/eval_on_video_attention_target.py"
else
    echo "Invalid dataset"
    exit 1
fi

export CUDA_VISIBLE_DEVICES="0"
echo "Evaluating with:"
echo "config: $config_file"
echo "checkpoint: $checkpoint"
python -u $evaluater --config_file $config_file --model_weights "$checkpoint" --use_dark_inference