diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-26 17:15:26 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-26 17:15:26 +0200 |
| commit | 8a8e15e37a34ac72627d32a2ee8bba036f73a019 (patch) | |
| tree | 6feb66c208d0e897b0ea631c1b767e150343d26d | |
| parent | d626b4b48e02649bf4cbf91864b580a5d4edae51 (diff) | |
dataset
| -rw-r--r-- | run.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -199,11 +199,11 @@ def store_frames(frames, outputPath, inputFirst=None, inputSecond=None, endpoint print('frames: {}'.format(len(frames))) writer = FFMPEG_VideoWriter(outputPath, (1024, 512), 25) if inputFirst is not None: - writer.write_frame(inputFirst) + writer.write_frame(tensor_to_image(inputFirst)) for frame in frames: writer.write_frame(tensor_to_image(frame)) if inputSecond is not None: - writer.write_frame(inputSecond) + writer.write_frame(tensor_to_image(inputSecond)) writer.close() if endpoint is not None: @@ -266,6 +266,7 @@ elif arguments_steps == 0: tensorInputSecond = load_image_tensor(arguments_strSecond) process(moduleNetwork, tensorInputFirst, tensorInputSecond, tensorOutput) PIL.Image.fromarray((numpy.rollaxis(tensorOutput.clamp(0.0, 1.0).numpy(), 0, 3)[:,:,::-1] * 255.0).astype(numpy.uint8)).save(arguments_strOut) + elif arguments_mixImages: print("{} => {}".format(arguments_strFirst, arguments_strSecond)) inputFirst = load_image(os.path.join(arguments_strFirst, "frame_{:0>5}.png".format(int(arguments_aOffset)+1))) |
