new_idx = range(int(video.fps * video.clip.duration))[::self.every]
elif self.hertz is not None:
interval = int(video.fps / self.hertz)
new_idx = range(int(video.fps * video.clip.duration))[::interval]
elif self.top_n is not None:
import cv2
diffs = []
for i, img in enumerate(video.frames):
After Change
new_idx = range(video.n_frames)[::self.every]
elif self.hertz is not None:
interval = video.fps / float(self.hertz)
new_idx = np.arange(0, video.n_frames, interval).astype(int)
new_idx = list(new_idx)
elif self.top_n is not None:
import cv2
diffs = []