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

Commit

Permalink
fix(preprocessor): move cv2 dep to pic_weight
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Xiao authored Jul 12, 2019
1 parent 37155bb commit 38fff78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnes/preprocessor/video/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.

from typing import List
import cv2
import numpy as np

from .base import BaseVideoPreprocessor
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 38fff78

Please sign in to comment.