Skip to content
Permalink
Browse files

fix(video preprocessor): Remove incorrect comments

  • Loading branch information...
raccoonliukai committed Aug 21, 2019
1 parent d420f34 commit dfb54b62c523ff78187708ad10999ebb90102c1d
Showing with 3 additions and 4 deletions.
  1. +0 −1 gnes/preprocessor/helper.py
  2. +3 −3 gnes/preprocessor/video/shotdetect.py
@@ -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,
@@ -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.
You can’t perform that action at this time.