forked from hanna-xu/MEF-GAN
-
Notifications
You must be signed in to change notification settings - Fork 8
/
test_main.py
41 lines (31 loc) · 854 Bytes
/
test_main.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
from __future__ import print_function
import time
# from utils import list_images
import os
import h5py
import numpy as np
import matplotlib.pyplot as plt
from train import train
# from generate import generate
from generate import generate
import scipy.ndimage
import scipy.io as scio
BATCH_SIZE = 18
EPOCHES = 4
LOGGING = 20
MODEL_SAVE_PATH = './models/'
def main():
print('\nBegin to generate pictures ...\n')
path = './test_imgs/'
Format='.JPG'
T=[]
for i in range(5):
index = i + 1
ue_path = path + 'u' + str(index) + Format
oe_path = path + 'o' + str(index) + Format
t=generate(oe_path, ue_path, MODEL_SAVE_PATH, index, output_path = './results/', format=Format)
T.append(t)
print("%s time: %s" % (index, t))
scio.savemat('time.mat', {'T': T})
if __name__ == '__main__':
main()