-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
30 lines (24 loc) · 1.19 KB
/
test.py
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
import os
import subprocess
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--input", type=str, default='/home/lyh/Source/CGI2023/inputs/')
parser.add_argument("--output", type=str, default='/home/lyh/Source/CGI2023/results/')
parser.add_argument("--tmp", type=str, default='/home/lyh/Source/CGI2023/doriginal/')
parser.add_argument("--cuda_num", type=str, default='0')
args = parser.parse_args()
os.makedirs(args.tmp, exist_ok=True)
denoise_cmd = 'CUDA_VISIBLE_DEVICES=' + args.cuda_num + ' python denoise_test.py --input '\
+ args.input + ' --output ' + args.output
cp_cmd = 'cp -r ' + args.output + '* ' + args.tmp
mv_cmd = 'mv ' + args.output + '* ' + args.input
sr_cmd = 'CUDA_VISIBLE_DEVICES=' + args.cuda_num + ' python sr_test.py --input '\
+ args.input + ' --output ' + args.output
color_cmd = 'CUDA_VISIBLE_DEVICES=' + args.cuda_num + ' python color_test.py --input '\
+ args.input + ' --output ' + args.output
subprocess.call(denoise_cmd, shell=True)
subprocess.call(cp_cmd, shell=True)
subprocess.call(mv_cmd, shell=True)
subprocess.call(sr_cmd, shell=True)
subprocess.call(mv_cmd, shell=True)
subprocess.call(color_cmd, shell=True)