diff options
| -rw-r--r-- | run.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -23,6 +23,7 @@ arguments_strVideoOut = datetime.now().strftime("sepconv_%Y%m%d_%H%M.mp4") arguments_steps = 0 arguments_aOffset = 0 arguments_bOffset = 0 +arguments_mixVideos = False for strOption, strArgument in getopt.getopt(sys.argv[1:], '', [ strParameter[2:] + '=' for strParameter in sys.argv[1::2] ])[0]: if strOption == '--model': @@ -39,6 +40,8 @@ for strOption, strArgument in getopt.getopt(sys.argv[1:], '', [ strParameter[2:] arguments_strVideoOut = strArgument # path to where the video should be stored elif strOption == '--steps': arguments_steps = int(strArgument) + elif strOption == '--mix-videos': + arguments_mixVideos = True elif strOption == '--a-offset': arguments_aOffset = int(strArgument) elif strOption == '--b-offset': @@ -139,7 +142,7 @@ if arguments_strVideo and arguments_strVideoOut: writer.write_frame((numpy.rollaxis(tensorOutput.clamp(0.0, 1.0).numpy(), 0, 3)[:,:,::-1] * 255.0).astype(numpy.uint8)) writer.write_frame(nextFrame) writer.close() -elif arguments_strVideoOut: +elif arguments_mixVideos: # Morph two videos print("{} => {}".format(arguments_strFirst, arguments_strSecond)) frames = process_two_videos(moduleNetwork, tensorOutput, arguments_strFirst, arguments_strSecond, arguments_aOffset, arguments_bOffset, arguments_steps) |
