-
Notifications
You must be signed in to change notification settings - Fork 91
/
Copy pathinference.sh
60 lines (60 loc) · 3.03 KB
/
inference.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
GPU_ID=0
# Phase2 test scoring
input_list="data/lists/phase2_list.txt"
for i in {1..3}
do
config="data/opts/exp1_seed1/exp1_seed1_fold${i}_.opt"
pth="data/opts/exp1_seed1/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp1_seed1/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done
for i in {1..3}
do
config="data/opts/exp1_2stage_seed1/exp1_2stage_seed1_fold${i}_stage2.opt"
pth="data/opts/exp1_2stage_seed1/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp1_2stage_seed1/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done
for i in {1..3}
do
config="data/opts/exp2_seed1/exp2_seed1_fold${i}_.opt"
pth="data/opts/exp2_seed1/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp2_seed1/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done
for i in {1..3}
do
config="data/opts/exp2_seed2/exp2_seed2_fold${i}_.opt"
pth="data/opts/exp2_seed2/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp2_seed2/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done
for i in {1..3}
do
config="data/opts/exp3b_seed1/exp3b_seed1_fold${i}_.opt"
pth="data/opts/exp3b_seed1/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp3b_seed1/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done
for i in {1..3}
do
config="data/opts/exp3b_seed2/exp3b_seed2_fold${i}_.opt"
pth="data/opts/exp3b_seed2/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp3b_seed2/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done
for i in {1..3}
do
config="data/opts/exp3c_seed1/exp3c_seed1_fold${i}_.opt"
pth="data/opts/exp3c_seed1/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp3c_seed1/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done
for i in {1..3}
do
config="data/opts/exp3c_seed2/exp3c_seed2_fold${i}_.opt"
pth="data/opts/exp3c_seed2/fold${i}/checkpoints/model_30.pth"
output_list="data/opts/exp3c_seed2/fold${i}/tta_epoch31_test_score.txt"
CUDA_VISIBLE_DEVICES=$GPU_ID python inference.py --config $config --pth $pth --input_list $input_list --output_list $output_list --tta "hflip_5crop_rotate"
done