summaryrefslogtreecommitdiff
path: root/run.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-07-01 13:30:32 +0200
committerJules Laplace <julescarbon@gmail.com>2018-07-01 13:30:32 +0200
commitf03b06aaa54d3781c4d204b6e3b634b21d390592 (patch)
treeaa35ace82701ca49a433a4799c510244d92e2802 /run.py
parent139284525ce7b4b2e55f9786266ef4c673995ad3 (diff)
endswith
Diffstat (limited to 'run.py')
-rw-r--r--run.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/run.py b/run.py
index efb31b9..98333f8 100644
--- a/run.py
+++ b/run.py
@@ -99,7 +99,14 @@ def recurse_videos(moduleNetwork, tensorOutput, a, b, a_offset, b_offset, count,
def process_two_videos(moduleNetwork, tensorOutput, a, b, a_offset, b_offset, steps, dilate):
steps *= dilate
- return recurse_videos(moduleNetwork, tensorOutput, a, b, a_offset, b_offset, steps, steps, steps/2, dilate)
+ a_fn = os.path.join(a, "frame_{:0>5}.png".format(int(steps + a_offset)))
+ frames = []
+ frames += load_image(a_fn)
+ frames += recurse_videos(moduleNetwork, tensorOutput, a, b, a_offset, b_offset, steps, steps, steps/2, dilate)
+ b_fn = os.path.join(b, "frame_{:0>5}.png".format(int(steps + b_offset + len(frames))))
+ if os.path.exists(b_fn):
+ frames += load_image(b_fn)
+ return frames
def average_two_videos(moduleNetwork, tensorOutput, a, b, a_offset, b_offset, steps, dilate):
global index