-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtest.py
27 lines (22 loc) · 792 Bytes
/
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
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--path_test", type=str, help="The path to the test images")
parser.add_argument("--pic_dir", type=str, help="Picture directory where to store all predicte images")
parser.add_argument("--model_path",type=str,help="Path to the keras model .h5 or .hdf5")
parser.add_argument("--cuda", type=str, help="cuda", default='2')
args = parser.parse_args()
print(args)
import os
from utils import *
from models import *
from utils import *
from models import *
from utils import *
from layers import *
if __name__ == '__main__':
opt = Option()
opt.pic_dir = args.pic_dir
opt.__dict__.update(args.__dict__)
opt.summary()
cycleGAN = CycleGAN(opt)
cycleGAN.predict(args.path_test, args.model_path)