Skip to content

Commit

Permalink
[Fix] fix bugs in dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
HaiyiMei committed Sep 1, 2023
1 parent 5eb9119 commit eaf30ba
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
21 changes: 17 additions & 4 deletions docs/en/installation/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

<!-- TOC -->

- [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)

<!-- TOC -->

Expand Down Expand Up @@ -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/).

Expand Down
3 changes: 2 additions & 1 deletion python/xrprimer/utils/ffmpeg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down
1 change: 0 additions & 1 deletion requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
numpy
scipy
1 change: 1 addition & 0 deletions requirements/synbody.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
imath
numpy
openexr
scipy
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
XRPRIMER_VERSION_MAJOR 0
XRPRIMER_VERSION_MINOR 7
XRPRIMER_VERSION_PATCH 0
XRPRIMER_VERSION_PATCH 1

0 comments on commit eaf30ba

Please sign in to comment.