From 546867553ff32caafbcac8bd8b449aa3971851b2 Mon Sep 17 00:00:00 2001 From: Johannes Stelzer Date: Sat, 6 Jan 2024 17:19:00 +0100 Subject: [PATCH] PIL handling; --- utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.py b/utils.py index d4424ea..759aa01 100644 --- a/utils.py +++ b/utils.py @@ -142,6 +142,8 @@ def add_frames_linear_interp( if nmb_frames_missing < 1: return list_imgs + if type(list_imgs[0]) == PIL.Image.Image: + list_imgs = [np.asarray(l) for l in list_imgs] list_imgs_float = [img.astype(np.float32) for img in list_imgs] # Distribute missing frames, append nmb_frames_to_insert(i) frames for each frame mean_nmb_frames_insert = nmb_frames_missing / nmb_frames_diff