-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathtest_DAVIS2016_raw.sh
executable file
·51 lines (45 loc) · 1.55 KB
/
test_DAVIS2016_raw.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
#!/bin/bash
#
# Script to compute raw results (before post-processing)
###
SCRIPT_DIR=$(dirname "$(realpath "$0")")
# parameters
DOWNLOAD_DIR="${SCRIPT_DIR}/../download"
CKPT_FILE="${DOWNLOAD_DIR}/unsupervised_detection_models/davis_best_model/model.best"
PWC_CKPT_FILE="${DOWNLOAD_DIR}/pwcnet-lg-6-2-multisteps-chairsthingsmix/pwcnet.ckpt-595000.data-00000-of-00001"
DATASET_FILE="${DOWNLOAD_DIR}/DAVIS"
RESULT_DIR="${SCRIPT_DIR}/../results/DAVIS"
echo "[INFO] start downloading data..."
mkdir -p ${DOWNLOAD_DIR}
(
cd ${DOWNLOAD_DIR}
if [ ! -f ${CKPT_FILE}.data* ]; then
echo "[INFO] no checkpoint file found. start downloading it."
wget https://rpg.ifi.uzh.ch/data/unsupervised_detection_models.zip
unzip unsupervised_detection_models.zip
rm unsupervised_detection_models.zip
fi
if [ ! -f ${PWC_CKPT_FILE} ]; then
echo "[INFO] no pwc checkpoint file found. start downloading it."
gdown --folder "https://drive.google.com/drive/folders/1gtGx_6MjUQC5lZpl6-Ia718Y_0pvcYou"
fi
if [ ! -e ${DATASET_FILE} ]; then
echo "[INFO] no DAVIS data found. start downloading it."
wget https://graphics.ethz.ch/Downloads/Data/Davis/DAVIS-data.zip
unzip DAVIS-data.zip
rm DAVIS-data.zip
fi
)
echo "[INFO] finished downloading."
echo "[INFO] start running a test..."
mkdir -p ${RESULT_DIR}
python3 test_generator.py \
--dataset=DAVIS2016 \
--ckpt_file=$CKPT_FILE \
--flow_ckpt=$PWC_CKPT_FILE \
--test_crop=0.9 \
--test_temporal_shift=1 \
--root_dir=$DATASET_FILE \
--generate_visualization=True \
--test_save_dir=${RESULT_DIR}
echo "[INFO] finished the test."