diff --git a/applications/DAIN/predict.py b/applications/DAIN/predict.py index 39290433b2b0cfbc2bfcce18d800740987c1d131..166106bf7b6e0c323ad0acdb5c58d25a92d84123 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])