diff --git a/docs/en/installation/python.md b/docs/en/installation/python.md index 17213b5..d349105 100644 --- a/docs/en/installation/python.md +++ b/docs/en/installation/python.md @@ -2,9 +2,12 @@ -- [Requirements](#requirements) -- [Prepare environment](#prepare-environment) -- [Install XRPrimer(python)](#install-xrprimerpython) +- [Installation (Python)](#installation-python) + - [Requirements](#requirements) + - [Prepare environment](#prepare-environment) + - [Install XRPrimer (python)](#install-xrprimer-python) + - [Install with pip](#install-with-pip) + - [Install by compiling from source](#install-by-compiling-from-source) @@ -52,7 +55,17 @@ pip install conan==1.51.1 conan remote add openxrlab http://conan.openxrlab.org.cn/artifactory/api/conan/openxrlab ``` -d. Install PyTorch and MMCV +d. Install Opencv + +```shell +pip install opencv-python + +# or install opencv in headless mode +pip install opencv-python-headless +``` + + +e. Install PyTorch and MMCV Install PyTorch and torchvision following [official instructions](https://pytorch.org/). 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 diff --git a/version.txt b/version.txt index 4a5642a..0836732 100644 --- a/version.txt +++ b/version.txt @@ -1,3 +1,3 @@ XRPRIMER_VERSION_MAJOR 0 XRPRIMER_VERSION_MINOR 7 -XRPRIMER_VERSION_PATCH 0 +XRPRIMER_VERSION_PATCH 1