def main(unused_argv=None):
# Load image
image = np.expand_dims(image_utils.load_np_image(
os.path.expanduser(FLAGS.input_image)), 0)
output_dir = os.path.expanduser(FLAGS.output_dir)
if not os.path.exists(output_dir):
os.makedirs(output_dir)
which_styles = ast.literal_eval(FLAGS.which_styles)
if isinstance(which_styles, list):
_multiple_images(image, which_styles, output_dir)
elif isinstance(which_styles, dict):
_multiple_styles(image, which_styles, output_dir)
else:
raise ValueError('--which_styles must be either a list of style indexes '
'or a dictionary mapping style indexes to weights.')
评论列表
文章目录