forked from yandech1/CS7641_project
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDiscriminator_Images.py
41 lines (35 loc) · 947 Bytes
/
Discriminator_Images.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
import matplotlib.pyplot as plt
import os
import glob
INPUT_DIR = "Results/Discriminator"
def main():
folders = ["Input", "PixelGAN", "PatchGAN1", "PatchGAN2", "PatchGAN3"]
plt.figure(figsize=(20, 15))
type = 0
fsize = 35
for file in folders:
test_images = sorted(glob.glob(os.path.join(INPUT_DIR, file, '*.jpg')))
type += 1
counter = 0
for img_path in test_images[0:5]:
img = plt.imread(img_path)
idx = 5 * counter + type
plt.subplot(5, 5, idx)
plt.imshow(img)
if idx == 1:
plt.title("Input", fontsize=fsize)
elif idx == 2:
plt.title("1x1", fontsize=fsize)
elif idx == 3:
plt.title("16x16", fontsize=fsize)
elif idx == 4:
plt.title("70x70", fontsize=fsize)
elif idx == 5:
plt.title("256x256", fontsize=fsize)
plt.axis('off')
counter += 1
# plt.savefig(fname="Artistic_Style3.png", bbox_inches='tight')
plt.show()
print('Saved Images')
if __name__ == '__main__':
main()