From b3118d713022686fabf7158306b0853677fb27c5 Mon Sep 17 00:00:00 2001 From: lijianshe02 Date: Tue, 13 Oct 2020 03:14:31 +0000 Subject: [PATCH] add adaptive frames interpolation after deduplicate frames --- applications/DAIN/predict.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/applications/DAIN/predict.py b/applications/DAIN/predict.py index 3929043..166106b 100644 --- a/applications/DAIN/predict.py +++ b/applications/DAIN/predict.py @@ -139,8 +139,14 @@ class VideoFrameInterp(object): end = time.time() frames = sorted(glob.glob(os.path.join(out_path, '*.png'))) + orig_frames = len(frames) + need_frames = orig_frames * times_interp + if remove_duplicates: frames = remove_duplicates(out_path) + left_frames = len(frames) + timestep = left_frames / need_frames + num_frames = int(1.0 / timestep) - 1 img = imread(frames[0]) -- GitLab