-
Notifications
You must be signed in to change notification settings - Fork 0
/
one_click_ntire19_drn.sh
39 lines (34 loc) · 1.19 KB
/
one_click_ntire19_drn.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
#!/usr/bin/env bash
# Author: Wenyi Tang
# Date: Mar. 18 2019
# Email: [email protected]
_DRN_TEST_MAT=${DRN_TEST_MAT}
_DRN_SAVE_DIR=${DRN_SAVE_DIR}
if [ ${DRN_TEST_MAT:0:1} != '/' ];then
_DRN_TEST_MAT=`pwd`/${DRN_TEST_MAT}
fi
if [ ${DRN_SAVE_DIR:0:1} != '/' ];then
_DRN_SAVE_DIR=`pwd`/${DRN_SAVE_DIR}
fi
if [ ! -e VideoSuperResolution ];
then
git clone https://github.com/LoSealL/VideoSuperResolution -b ntire_2019
fi
pushd VideoSuperResolution
if [ ! -e setup.py ];
then
echo " [!] Can't find setup.py file! Make sure you are in the right place!"
fi
echo "DRN_TEST_MAT=${_DRN_TEST_MAT}"
echo "DRN_SAVE_DIR=${_DRN_SAVE_DIR}"
pip install -q -e .
python prepare_data.py --filter=drn -q
echo " [*] Model extracted into Results/drn/save"
python VSR/Tools/DataProcessing/NTIRE19Denoise.py --validation=${_DRN_TEST_MAT} --save_dir=${_DRN_SAVE_DIR}/1/
pushd VSRTorch
python eval.py drn --cuda --ensemble -t=${_DRN_SAVE_DIR}/1/ --output_index=0
popd
python VSR/Tools/DataProcessing/NTIRE19Denoise.py --results=Results/drn/1/ --save_dir=${_DRN_SAVE_DIR}/2/
echo " [*] Processing done. Results are in ${_DRN_SAVE_DIR}/2/results.mat"
echo " PNG files are saved in VideoSuperResolution/Results/drn/1/"
popd