Skip to content
Permalink
Browse files

fix(preprocessor): fix type of index in shotdetect

  • Loading branch information...
raccoonliukai committed Sep 19, 2019
1 parent 6833a27 commit 092379e18810956381a3347bd8730016526d7af9
Showing with 1 addition and 1 deletion.
  1. +1 −1 gnes/preprocessor/video/shotdetect.py
@@ -99,7 +99,7 @@ def apply(self, doc: 'gnes_pb2.Document') -> None:
shot_len = len(frames)
c.weight = shot_len / num_frames
if self.sframes > 0 and shot_len > self.sframes:
start_id = (shot_len - self.sframes) / 2
start_id = int((shot_len - self.sframes) / 2)
end_id = start_id + self.sframes
frames = frames[start_id:end_id]
chunk_data = np.array(frames)

0 comments on commit 092379e

Please sign in to comment.
You can’t perform that action at this time.