From 67d92e2d1a61cf1ce598240336f4a63a53bd4461 Mon Sep 17 00:00:00 2001 From: meihaiyi Date: Thu, 31 Aug 2023 23:47:15 +0800 Subject: [PATCH] [Fix] shorten requirements for more "lite" --- python/xrprimer/utils/ffmpeg_utils.py | 3 ++- requirements/runtime.txt | 1 - requirements/synbody.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/xrprimer/utils/ffmpeg_utils.py b/python/xrprimer/utils/ffmpeg_utils.py index 4a6343f..106f236 100644 --- a/python/xrprimer/utils/ffmpeg_utils.py +++ b/python/xrprimer/utils/ffmpeg_utils.py @@ -8,7 +8,6 @@ from pathlib import Path from typing import Any, Tuple, Union -import cv2 import numpy as np from .log_utils import get_logger @@ -484,6 +483,8 @@ def images_to_array_opencv( Returns: np.ndarray: shape will be (f * h * w * 3). """ + import cv2 + check_path( input_path=input_folder, allowed_existence=[Existence.DirectoryExistNotEmpty], diff --git a/requirements/runtime.txt b/requirements/runtime.txt index 6bad103..24ce15a 100644 --- a/requirements/runtime.txt +++ b/requirements/runtime.txt @@ -1,2 +1 @@ numpy -scipy diff --git a/requirements/synbody.txt b/requirements/synbody.txt index 418a4da..5bb8559 100644 --- a/requirements/synbody.txt +++ b/requirements/synbody.txt @@ -1,3 +1,4 @@ imath numpy openexr +scipy