forked from yangyanli/PointCNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_shapenet.sh
executable file
·68 lines (59 loc) · 1.19 KB
/
test_shapenet.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
#!/usr/bin/env bash
gpu=
setting=
ckpt=
repeat=
save_ply=
usage() { echo "test pointcnn_seg with -g gpu_id -x setting -l ckpt -r repeat -s options"; }
gpu_flag=0
setting_flag=0
ckpt_flag=0
repeat_flag=0
while getopts g:x:l:r:sh opt; do
case $opt in
g)
gpu_flag=1;
gpu=$(($OPTARG))
;;
x)
setting_flag=1;
setting=${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 [ $ckpt_flag -eq 0 ]
then
echo "-l option is not presented!"
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_shapenet_seg.py -f ../../data/shapenet_partseg/test_files.txt -c ../../data/shapenet_partseg/categories.txt -d ../../data/shapenet_partseg/test_data -l $ckpt -m pointcnn_seg -x $setting -r $repeat $save_ply