Skip to content
Permalink
Browse files

fix(preprocessor): move cv2 dep to pic_weight

  • Loading branch information...
hanxiao committed Jul 12, 2019
1 parent 37155bb commit 38fff78212b3bff88f1c5a3c5423011234e12e64
Showing with 1 addition and 1 deletion.
  1. +1 −1 gnes/preprocessor/video/ffmpeg.py
@@ -14,7 +14,6 @@
# limitations under the License.

from typing import List
import cv2
import numpy as np

from .base import BaseVideoPreprocessor
@@ -72,6 +71,7 @@ def apply(self, doc: 'gnes_pb2.Document') -> None:

@staticmethod
def pic_weight(images: List['np.ndarray']) -> List[float]:
import cv2
weight = np.zeros([len(images)])
# n_channel is usually 3 for RGB images
n_channel = images[0].shape[-1]

0 comments on commit 38fff78

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