summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-25 17:58:59 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-25 17:58:59 +0200
commite472c27fcadf38f7decbfb2bc5f2213625956811 (patch)
tree18aadd108d481d67d636227fdef91964d5ad9a27
parent64a322888397bb7170a5f1eb4719e8efcd7d43c9 (diff)
run thang
-rw-r--r--run.py5
1 files changed, 4 insertions, 1 deletions
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)