From e472c27fcadf38f7decbfb2bc5f2213625956811 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 25 Jun 2018 17:58:59 +0200 Subject: run thang --- run.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index 5886677..5012807 100644 --- a/run.py +++ b/run.py @@ -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) -- cgit v1.2.3-70-g09d2