aboutsummaryrefslogtreecommitdiff
path: root/gantools/cli.py
diff options
context:
space:
mode:
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.')