diff --git a/docs/en/install.md b/docs/en/install.md index 478a7da3..26e46d05 100644 --- a/docs/en/install.md +++ b/docs/en/install.md @@ -16,7 +16,7 @@ MMOCR has different version requirements on MMCV and MMDetection at each release | MMOCR | MMCV | MMDetection | | ------------ | ---------------------- | ------------------------- | -| main | 1.3.8 <= mmcv <= 1.6.0 | 2.21.0 <= mmdet <= 3.0.0 | +| main | 1.3.8 <= mmcv <= 1.6.0 | 2.21.0 <= mmdet <= 3.0.0 | | 0.5.0 | 1.3.8 <= mmcv <= 1.5.0 | 2.14.0 <= mmdet <= 3.0.0 | | 0.4.0, 0.4.1 | 1.3.8 <= mmcv <= 1.5.0 | 2.14.0 <= mmdet <= 2.20.0 | | 0.3.0 | 1.3.8 <= mmcv <= 1.4.0 | 2.14.0 <= mmdet <= 2.20.0 | @@ -112,6 +112,22 @@ pip install -v -e . # or "python setup.py develop" export PYTHONPATH=$(pwd):$PYTHONPATH ``` +g. (optional) If you would like to use any transform involving `albumentations` (For example, `Albu` in ABINet's pipeline): + +```shell +pip install -r requirements/albu.txt +``` + +:::{note} + +We recommend checking the environment after installing `albumentations` to +ensure that `opencv-python` and `opencv-python-headless` are not installed together, otherwise it might cause unexpected issues. If that's unfortunately the case, please uninstall `opencv-python-headless` to make sure MMOCR's visualization utilities can work. + +Refer +to ['albumentations`'s official documentation](https://albumentations.ai/docs/getting_started/installation/#note-on-opencv-dependencies) for more details. + +::: + ## Full Set-up Script Here is the full script for setting up MMOCR with Conda. @@ -136,6 +152,9 @@ cd mmocr pip install -r requirements.txt pip install -v -e . # or "python setup.py develop" export PYTHONPATH=$(pwd):$PYTHONPATH + +# for albumentations +pip install -r requirements/albu.txt ``` ## Another option: Docker Image diff --git a/docs/zh_cn/install.md b/docs/zh_cn/install.md index 5b88fe7b..616c8cd6 100644 --- a/docs/zh_cn/install.md +++ b/docs/zh_cn/install.md @@ -16,7 +16,7 @@ | MMOCR | MMCV | MMDetection | | ------------ | ---------------------- | ------------------------- | -| main | 1.3.8 <= mmcv <= 1.6.0 | 2.21.0 <= mmdet <= 3.0.0 | +| main | 1.3.8 <= mmcv <= 1.6.0 | 2.21.0 <= mmdet <= 3.0.0 | | 0.5.0 | 1.3.8 <= mmcv <= 1.5.0 | 2.14.0 <= mmdet <= 3.0.0 | | 0.4.0, 0.4.1 | 1.3.8 <= mmcv <= 1.5.0 | 2.14.0 <= mmdet <= 2.20.0 | | 0.3.0 | 1.3.8 <= mmcv <= 1.4.0 | 2.14.0 <= mmdet <= 2.20.0 | @@ -111,6 +111,20 @@ pip install -v -e . # or "python setup.py develop" export PYTHONPATH=$(pwd):$PYTHONPATH ``` +g. (可选)如果你需要使用与 `albumentations` 有关的变换,比如 ABINet 数据流水线中的 `Albu`,请使用以下命令安装依赖: + +```shell +pip install -r requirements/albu.txt +``` + +:::{note} + +我们建议在安装 `albumentations` 之后检查当前环境,确保 `opencv-python` 和 `opencv-python-headless` 没有同时被安装,否则有可能会产生一些无法预知的错误。如果它们不巧同时存在于环境当中,请卸载 `opencv-python-headless` 以确保 MMOCR 的可视化工具可以正常运行。 + +查看 [`albumentations` 的官方文档](https://albumentations.ai/docs/getting_started/installation/#note-on-opencv-dependencies)以获知详情。 + +::: + ## 完整安装命令 以下是 conda 方式安装 mmocr 的完整安装命令。 @@ -135,6 +149,9 @@ cd mmocr pip install -r requirements.txt pip install -v -e . # 或 "python setup.py develop" export PYTHONPATH=$(pwd):$PYTHONPATH + +# 安装 albumentations +pip install -r requirements/albu.txt ``` ## 可选方式: Docker镜像 diff --git a/requirements/albu.txt b/requirements/albu.txt new file mode 100644 index 00000000..ddcc3fb3 --- /dev/null +++ b/requirements/albu.txt @@ -0,0 +1 @@ +albumentations>=1.1.0 --no-binary qudida,albumentations diff --git a/requirements/optional.txt b/requirements/optional.txt index 0bfcc417..e69de29b 100644 --- a/requirements/optional.txt +++ b/requirements/optional.txt @@ -1 +0,0 @@ -albumentations>=1.1.0