diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-25 15:28:25 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-25 15:28:25 +0200 |
| commit | 7d3d1cb632a4d534149542165ec5e78cd46016fd (patch) | |
| tree | 674e8fcd049f773d9796da3fdb94739511ab3872 | |
| parent | cb25a532a89f4d971193038bb7dce1e4436381f9 (diff) | |
split out network, do a morph dewd
| -rw-r--r-- | run.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,6 @@ #!/usr/bin/env python2.7 +import os import sys import getopt import numpy @@ -38,6 +39,8 @@ for strOption, strArgument in getopt.getopt(sys.argv[1:], '', [ strParameter[2:] arguments_steps = int(strArgument) # end # end +if not os.path.exists('./renders'): + os.mkdir('renders') moduleNetwork = Network(arguments_strModel).cuda() tensorOutput = torch.FloatTensor() @@ -76,7 +79,7 @@ else: PIL.Image.fromarray((numpy.rollaxis(tensorOutput.clamp(0.0, 1.0).numpy(), 0, 3)[:,:,::-1] * 255.0).astype(numpy.uint8)).save(arguments_strOut) else: tree = process_tree(moduleNetwork, tensorInputFirst, tensorInputSecond, tensorOutput, arguments_steps) - writer = FFMPEG_VideoWriter(arguments_strVideoOut, (1024, 512), 25) + writer = FFMPEG_VideoWriter('./renders/' + arguments_strVideoOut, (1024, 512), 25) writer.write_frame(tensorInputFirst) for frame in tree: writer.write_frame(frame) |
