Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(preprocessor): fix type of index in shotdetect
Browse files Browse the repository at this point in the history
  • Loading branch information
raccoonliukai committed Sep 19, 2019
1 parent 6833a27 commit 092379e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnes/preprocessor/video/shotdetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 092379e

Please sign in to comment.