summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-21 15:33:41 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-21 15:33:41 +0200
commitb7cf6a078f409849e764327cc87fda842717a6a4 (patch)
treec9226246e501bf004b18f614b6e339da70fdd6fe
parentd7d14946e13afc1e921ca31f8d54fab0e3f5253d (diff)
cmdz
-rw-r--r--live-mogrify.py6
1 files changed, 3 insertions, 3 deletions
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*')