forked from nerfstudio-project/nerfstudio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess_data.sh
executable file
·48 lines (45 loc) · 956 Bytes
/
process_data.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
if [ -z $1 ]
then
export CUDA_VISIBLE_DEVICES=0
else
export CUDA_VISIBLE_DEVICES=$1
fi
if [ -z $2 ]
then
export TYPE="images"
else
export TYPE=$2
fi
if [ -z $3 ]
then
export DATASET="data/nerfstudio/kitchen"
else
export DATASET=$3
fi
if [ -z $4 ]
then
export SFM=colmap #hloc
else
export SFM=$4
fi
if [ -z $5 ]
then
export OUTPUT_DIR=$DATASET
else
export OUTPUT_DIR=$5
fi
# for the video case update output_dir to the folder where its located
if [ $TYPE=="video" ]
then
export OUTPUT_DIR=$(dirname $DATASET)
fi
# disable xcb Qt
export QT_QPA_PLATFORM=offscreen
# RUN
{
echo "ns-process-data $TYPE --data $DATASET --output-dir $OUTPUT_DIR --sfm_tool $SFM"
ns-process-data $TYPE --data $DATASET --output-dir $OUTPUT_DIR --sfm_tool $SFM
} || {
echo "ns-process-data $TYPE --data $DATASET --output-dir $OUTPUT_DIR --no-gpu --sfm_tool $SFM" # without --no-gpu crashes
ns-process-data $TYPE --data $DATASET --output-dir $OUTPUT_DIR --no-gpu --sfm_tool $SFM
}