From b7cf6a078f409849e764327cc87fda842717a6a4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 15:33:41 +0200 Subject: cmdz --- live-mogrify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'live-mogrify.py') diff --git a/live-mogrify.py b/live-mogrify.py index 4e535e3..85a9ee2 100644 --- a/live-mogrify.py +++ b/live-mogrify.py @@ -127,12 +127,12 @@ def process_image(opt, data_opt, im): def list_checkpoints(): print("> list checkpoints") - return glob.glob('./checkpoints/*/latest_net_G*') + return sorted([f.split('/')[2] for f in glob.glob('./checkpoints/*/latest_net_G.pth')]) def list_checkpoint_dir(path): print("> list checkpoint path {}".format(path)) - if not os.path.exists('./checkpoints/' + path): + if not os.path.exists(os.path.join('./checkpoints/', path)): return "not found" - return glob.glob(os.path.join('./checkpoints/' + path + '/*_net_G.pth')) + return sorted([f.split('/')[3].replace('_net_G.pth','') for f in glob.glob('./checkpoints/' + path + '/*_net_G.pth')]) def list_datasets(): print("> list datasets") # return glob.glob('./checkpoints/*/latest_net_G*') -- cgit v1.2.3-70-g09d2