forked from yangyanli/PointCNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train_val_s3dis.sh
executable file
·59 lines (50 loc) · 1.1 KB
/
train_val_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
#!/usr/bin/env bash
gpu=
setting=
area=
models_folder="../../models/seg/"
data_folder="../../data/s3dis/"
usage() { echo "train/val pointcnn_seg with -g gpu_id -x setting -a area options"; }
gpu_flag=0
setting_flag=0
area_flag=0
while getopts g:x:a:h opt; do
case $opt in
g)
gpu_flag=1;
gpu=$(($OPTARG))
;;
x)
setting_flag=1;
setting=${OPTARG}
;;
a)
area_flag=1;
area=$(($OPTARG))
;;
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 [ ! -d "$models_folder" ]
then
mkdir -p "$models_folder"
fi
echo "Train/Val with setting $setting on GPU $gpu for Area $area!"
CUDA_VISIBLE_DEVICES=$gpu python3 ../train_val_seg.py -t $data_folder/train_files_for_val_on_Area_$area.txt -v $data_folder/val_files_Area_$area.txt -s $models_folder -m pointcnn_seg -x $setting > $models_folder/pointcnn_seg_$setting.txt 2>&1 &