-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrun_discrete.py
55 lines (46 loc) · 1.26 KB
/
run_discrete.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
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
import os;
import sys;
import platform;
if(platform.system()=="Windows"):
bin_directory = "bin/Release"
else:
bin_directory = "bin"
n_iterations = 2;
patch_size = 1;
max_motion = 5;
n_particles = 1;
weight_pw = 10;
truncate_pw = 0.1;
tau1 = 20;
tau2 = 20;
alpha = 0;
asw = 15;
border = 0.85;
out_dir = "outputs/test"
os.system("mkdir -p "+out_dir)
one_name = "data/dog1_noise.png";
two_name = "data/dog2.png";
if(platform.system()=="Windows"):
exe = "pmbp.exe"
else:
exe = "pmbp"
command = bin_directory + "/" + exe + " -discrete " + \
" -one " + one_name + \
" -two " + two_name + \
" -n_iterations " + str(n_iterations) + \
" -patch_size " + str(patch_size) + \
" -max_motion " + str(max_motion) + \
" -weight_pw " + str(weight_pw) + \
" -n_particles " + str(n_particles) + \
" -weight_pw " + str(weight_pw) + \
" -truncate_pw " + str(truncate_pw) + \
" -tau1 " + str(tau1) + \
" -tau2 " + str(tau2) + \
" -alpha " + str(alpha) + \
" -asw " + str(asw) + \
" -border " + str(border) + \
" -out_dir " + str(out_dir)
print command
if(platform.system()=="Windows"):
command = command.replace("/","\\")
os.system(command)