diff options
Diffstat (limited to 'run.py')
| -rw-r--r-- | run.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |
