RAIL-KNUST commited on
Commit
2319659
·
verified ·
1 Parent(s): 566bed0

Upload 5 files

Browse files
Files changed (5) hide show
  1. 200_net_D_A.pth +3 -0
  2. 200_net_D_B.pth +3 -0
  3. 200_net_G_A.pth +3 -0
  4. 200_net_G_B.pth +3 -0
  5. test.py +40 -0
200_net_D_A.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bfe393a8dd711365ad6c9187d82e3080ff001b581d7aaddbbe6bcc3780fc3e6
3
+ size 11062960
200_net_D_B.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2515ac59c215cc82b3e3f6f3ebcf19af2cac66387453fdf6e6462951fa769f8
3
+ size 11062960
200_net_G_A.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f816d00da7dcb8cd98ef4ffce6ae5bef93eae1596de81cf5e893e0199c920c04
3
+ size 45531926
200_net_G_B.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e973a533975fade84d2f45c550952e942b67d24ac570b50e6c2987373180c6f6
3
+ size 45531926
test.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from options.test_options import TestOptions
3
+ from data import CreateDataLoader
4
+ from models import create_model
5
+ from util.visualizer import save_images
6
+ from util import html
7
+
8
+
9
+ if __name__ == '__main__':
10
+ opt = TestOptions().parse()
11
+ # hard-code some parameters for test
12
+ opt.num_threads = 1 # test code only supports num_threads = 1
13
+ opt.batch_size = 1 # test code only supports batch_size = 1
14
+ opt.serial_batches = True # no shuffle
15
+ opt.no_flip = True # no flip
16
+ opt.display_id = -1 # no visdom display
17
+ data_loader = CreateDataLoader(opt)
18
+ dataset = data_loader.load_data()
19
+ model = create_model(opt)
20
+ model.setup(opt)
21
+ # create a website
22
+ web_dir = os.path.join(opt.results_dir, opt.name, '%s_%s' % (opt.phase, opt.epoch))
23
+ webpage = html.HTML(web_dir, 'Experiment = %s, Phase = %s, Epoch = %s' % (opt.name, opt.phase, opt.epoch))
24
+ # test with eval mode. This only affects layers like batchnorm and dropout.
25
+ # pix2pix: we use batchnorm and dropout in the original pix2pix. You can experiment it with and without eval() mode.
26
+ # CycleGAN: It should not affect CycleGAN as CycleGAN uses instancenorm without dropout.
27
+ if opt.eval:
28
+ model.eval()
29
+ for i, data in enumerate(dataset):
30
+ if i >= opt.num_test:
31
+ break
32
+ model.set_input(data)
33
+ model.test()
34
+ visuals = model.get_current_visuals()
35
+ img_path = model.get_image_paths()
36
+ if i % 5 == 0:
37
+ print('processing (%04d)-th image... %s' % (i, img_path))
38
+ save_images(webpage, visuals, img_path, aspect_ratio=opt.aspect_ratio, width=opt.display_winsize)
39
+ # save the website
40
+ webpage.save()