def main(): parser = build_parser() opts = parser.parse_args() # check for json, single file, or dir if os.path.isfile(opts.in_path): if os.path.splitext(opts.in_path)[1] == ".json": manifest = json.load(open(opts.in_path, 'r')) if os.path.exists(opts.s3s3_bucket_path): manifest = [ f.replace(opts.cloudfront_url, opts.s3_bucket_path) for f in manifest ] else: print( "--s3-bucket-path option is set to a folder that does not exist" ) else: manifest = [opts.in_path] else: manifest = [ os.path.join(opts.in_path, f) for f in os.listdir(opts.in_path) ] for in_file in manifest: in_split = os.path.splitext(os.path.basename(in_file)) out_file = os.path.join(opts.out, "{}_st{}".format(in_split[0], in_split[1])) evaluate.ffwd_video(in_file, out_file, opts.checkpoint, opts.device, opts.batch_size)
def main(): parser = build_parser() opts = parser.parse_args() evaluate.ffwd_video( opts.in_path, opts.out, opts.checkpoint, opts.device, opts.batch_size, data_format=opts.data_format, num_base_channels=opts.num_base_channels, # more cli params evaluate=False)
def do_start(self): style_checkpoint_path = style_path.split(".")[0] + ".ckpt" out_path = storage_location_path + content_path.split('\\')[-1] if content_is_video: evaluate.ffwd_video(content_path, out_path, style_checkpoint_path) if show_result.show_video(out_path): return True else: evaluate.ffwd_to_img(content_path, out_path, style_checkpoint_path) if show_result.show_image(out_path): return True # time.sleep(10) '''
def main(): parser = build_parser() opts = parser.parse_args() evaluate.ffwd_video(opts.in_path, opts.out, opts.checkpoint, opts.device, opts.batch_size)