From 820792a752f546dd143efd2c15bd72804cb8d45b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 9 Jan 2019 16:21:27 +0100 Subject: fix test --- test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index 62d108a..b213c2b 100644 --- a/test.py +++ b/test.py @@ -36,8 +36,9 @@ if not(args.T == 'L' or args.T =='G'): print('Invalid input type: {} (Must be L(Low-resolution) or G(Ground-truth))'.format(args.T)) exit(1) -def process_dir(v): - scene_name = v.split('/')[-1] +def process_dir(v, scene_name): + if scene_name is None: + scene_name = v.split('/')[-1] os.mkdir('./results/{}L/L/{}/'.format(args.L, scene_name)) dir_frames = glob.glob(v + '/*.png') @@ -154,7 +155,7 @@ with tf.Session(config=config) as sess: elif args.T == 'L': # Test using Low-resolution videos if args.dir: - process_dir(args.dir) + process_dir(args.dir, scene_name=args.dir.replace('.', '').replace('/', '_')) else: dir_inputs = glob.glob('./inputs/L/*') for v in dir_inputs: -- cgit v1.2.3-70-g09d2