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

Commit

Permalink
fix(video preprocessor): Remove incorrect comments
Browse files Browse the repository at this point in the history
  • Loading branch information
raccoonliukai committed Aug 21, 2019
1 parent d420f34 commit dfb54b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion gnes/preprocessor/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ def thre_algo(distances: List[float], **kwargs) -> List[int]:

def motion_algo(distances: List[float], **kwargs) -> List[int]:
import peakutils
""" Returns the list of peaks in the ECR serie"""
arg_dict = {
'threshold': 0.6,
'min_dist': 10,
Expand Down
6 changes: 3 additions & 3 deletions gnes/preprocessor/video/shotdetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def apply(self, doc: 'gnes_pb2.Document') -> None:
if doc.raw_bytes:
shot_frames, num_frames = self.detect_from_bytes(doc.raw_bytes)

for ci in range(0, len(shot_frames)):
for ci, value in enumerate(shot_frames):
c = doc.chunks.add()
c.doc_id = doc.doc_id
chunk = np.array(shot_frames[ci]).astype('uint8')
chunk = np.array(value).astype('uint8')
c.blob.CopyFrom(array2blob(chunk))
c.offset_1d = ci
c.weight = len(shot_frames[ci]) / num_frames
c.weight = len(value) / num_frames
else:
self.logger.error('bad document: "raw_bytes" is empty!')

0 comments on commit dfb54b6

Please sign in to comment.