forked from yangyanli/PointCNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_s3dis.sh
executable file
·81 lines (70 loc) · 1.31 KB
/
test_s3dis.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env bash
gpu=
setting=
area=
ckpt=
repeat=
save_ply=
usage() { echo "test pointcnn_seg with -g gpu_id -x setting -a area -l ckpt -r repeat -s options"; }
gpu_flag=0
setting_flag=0
area_flag=0
ckpt_flag=0
repeat_flag=0
while getopts g:x:a:l:r:sh opt; do
case $opt in
g)
gpu_flag=1;
gpu=$(($OPTARG))
;;
x)
setting_flag=1;
setting=${OPTARG}
;;
a)
area_flag=1;
area=$(($OPTARG))
;;
l)
ckpt_flag=1;
ckpt=${OPTARG}
;;
r)
repeat_flag=1;
repeat=$(($OPTARG))
;;
s)
save_ply=-s
;;
h)
usage; exit;;
esac
done
shift $((OPTIND-1))
if [ $gpu_flag -eq 0 ]
then
echo "-g option is not presented!"
usage; exit;
fi
if [ $setting_flag -eq 0 ]
then
echo "-x option is not presented!"
usage; exit;
fi
if [ $area_flag -eq 0 ]
then
echo "-a option is not presented!"
usage; exit;
fi
if [ $ckpt_flag -eq 0 ]
then
echo "-l option is not presented!"1
usage; exit;
fi
if [ $repeat_flag -eq 0 ]
then
echo "-r option is not presented!"
usage; exit;
fi
echo "Test setting $setting on GPU $gpu with checkpoint $ckpt! with repeat $repeat"
CUDA_VISIBLE_DEVICES=$gpu python3 ../test_general_seg.py -t ../../data/s3dis/val_files_Area_$area.txt -f ../../data/s3dis/Area${area}_data/ -l $ckpt -m pointcnn_seg -x $setting -r $repeat $save_ply