From c86b54b92b70b8a19afa8bc756367dd44298562b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 1 Jul 2018 13:00:36 +0200 Subject: padding --- run.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'run.py') diff --git a/run.py b/run.py index b059835..c589fab 100644 --- a/run.py +++ b/run.py @@ -85,7 +85,7 @@ def recurse_videos(moduleNetwork, tensorOutput, a, b, a_offset, b_offset, count, b_fn = os.path.join(b, "frame_{:0>5}.png".format(int(frame_index + b_offset))) print("{} => {}".format(a_fn, b_fn)) if not os.path.exists(a_fn) or not os.path.exists(b_fn): - return [ None ] + return [ None ] a_np = load_image(a_fn) b_np = load_image(b_fn) img_np = recurse_two_frames(moduleNetwork, tensorOutput, a_np, b_np, frame_index, count / 2, count / 4) @@ -112,7 +112,7 @@ def average_two_videos(moduleNetwork, tensorOutput, a, b, a_offset, b_offset, st b_fn = os.path.join(b, "frame_{:0>5}.png".format(int(i + b_offset))) print("{} => {}".format(a_fn, b_fn)) if not os.path.exists(a_fn) and not os.path.exists(b_fn): - continue + continue a_np = load_image(a_fn) b_np = load_image(b_fn) tensorInputFirst = torch.FloatTensor(a_np) @@ -176,8 +176,8 @@ def dilate_frames(moduleNetwork, tensorOutput, frames, dilate): return new_frames def store_frames(frames, outputPath, opt, inputFirst=None, inputSecond=None): - if not outputPath.endsWith('.mp4'): - outputPath += '.mp4' + if not outputPath.endsWith('.mp4'): + outputPath += '.mp4' print('writing {}'.format(outputPath)) print('frames: {}'.format(len(frames))) writer = FFMPEG_VideoWriter(outputPath, (1024, 512), FPS) -- cgit v1.2.3-70-g09d2