aboutsummaryrefslogtreecommitdiff
path: root/gantools/cli.py
diff options
context:
space:
mode:
authorVee9ahd1 <[email protected]>2019-06-03 12:17:29 -0400
committerVee9ahd1 <[email protected]>2019-06-03 12:17:29 -0400
commit69eb6678fc1c61fdb77f84f25f29ba9f777cd3dd (patch)
treef4320244e50ef7bb6ae34e216d9266f6c67ae1dc /gantools/cli.py
parentdcc12c31b79ac9a17738d75adba65556624c412e (diff)
output directory and file prefix (base name) are now handled by different arguments
Diffstat (limited to 'gantools/cli.py')
-rw-r--r--gantools/cli.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gantools/cli.py b/gantools/cli.py
index 73213ed..0ad3a8d 100644
--- a/gantools/cli.py
+++ b/gantools/cli.py
@@ -16,7 +16,8 @@ def main():
parser.add_argument('-b', '--nbatch', metavar='N', type=int, help='Number of frames in each \'batch\' \
(note: the truncation value can only change once per batch. Don\'t fuck with this unless you know \
what it does.).', default=1)
- parser.add_argument('-f', '--pathprefix', help='Directory path and file prefix for output images.')
+ parser.add_argument('-o', '--output-dir', help='Directory path for output images.')
+ parser.add_argument('--prefix', help='File prefix for output images.')
args = parser.parse_args()
# validate args
if args.keys and not (args.username and args.password):
@@ -38,8 +39,9 @@ def main():
ims = gan.sample(z_seq, label_seq, truncation_seq, args.nbatch)
# save images to file
- pathprefix = '' if args.pathprefix == None else str(args.pathprefix)
- print('Saving image files: '+pathprefix)
- image_utils.save_images(ims, pathprefix)
+ path = '' if args.output_dir == None else str(args.output_dir)
+ prefix = '' if args.prefix == None else str(args.prefix)
+ print('Saving image files: '+path + prefix)
+ image_utils.save_images(ims, output_dir=output_dir, prefix=prefix)
print('Done.')