diff --git a/docs/Linux编译教程.md b/docs/Linux编译教程.md index 084e3d0cd5..c053a2a1c3 100644 --- a/docs/Linux编译教程.md +++ b/docs/Linux编译教程.md @@ -15,10 +15,10 @@ ### PaddleOCR 1. 使用我魔改了接口的版本: -2. 参考 [这个教程](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/deploy/cpp_infer/readme_ch.md) -3. 额外依赖的 `PaddlePaddle` 直接 [下载](https://paddleinference.paddlepaddle.org.cn/master/user_guides/download_lib.html) 即可。其中 `avx` 和 `mkl` 两者都可以提高计算效率,建议选择。但如果 CPU 不支持,则只能选择 `noavx` 和 `openblas` 的兼容性版本(一般稍微新一点的 CPU 都支持两者了,AMD 的也没关系)。 `cuda` 和 `cudnn` 是 GPU 加速库,在 `PaddleOCR` 上可能比较麻烦,我没折腾过,有兴趣可以尝试下 -4. 若 `cmake` 找不到 `Opencv` ,可尝试修改 [Opencv 的查找路径](https://github.com/MistEO/PaddleOCR/blob/release/2.3/deploy/cpp_infer/CMakeLists.txt#L49) -5. 若您使用 `MKL` 版本,可修改 [MKL 宏定义](https://github.com/MistEO/PaddleOCR/blob/release/2.3/deploy/cpp_infer/include/ocr_defines.h#L9) 为 `true` 以提高性能 +2. 参考 [这个教程](https://github.com/MaaAssistantArknights/PaddleOCR/blob/release/2.5/deploy/cpp_infer/readme_ch.md) +3. 额外依赖的 `paddle_inference` 直接 [下载](https://paddleinference.paddlepaddle.org.cn/master/user_guides/download_lib.html) 即可。其中 `avx` 和 `mkl` 两者都可以提高计算效率,建议选择。但如果 CPU 不支持,则只能选择 `noavx` 和 `openblas` 的兼容性版本(一般稍微新一点的 CPU 都支持两者了,AMD 的也没关系)。 `cuda` 和 `cudnn` 是 GPU 加速库,在 `PaddleOCR` 上可能比较麻烦,我没折腾过,有兴趣可以尝试下 +4. 若 `cmake` 找不到 `Opencv` ,可尝试修改 [Opencv 的查找路径](https://github.com/MaaAssistantArknights/PaddleOCR/blob/release/2.5/deploy/cpp_infer/CMakeLists.txt#L49) +5. 若您使用**非** `MKL` 版本,需要关闭 [MKL 宏定义](https://github.com/MaaAssistantArknights/PaddleOCR/blob/release/2.5/deploy/cpp_infer/src/args.cpp#L24) (改为 `false`) 编译选项参考 @@ -42,7 +42,7 @@ sudo ldconfig 1. 直接拷贝上面编译的第三方库到 `3rdparty/lib` 或者 手动修改 `CMakeLists.txt` 指定第三方库路径 2. `3rdparty/include/opencv` 中的头文件是 `4.5.3` 版本的,若是使用其他版本,请注意头文件冲突问题(直接将你的 `opencv` 头文件覆盖过去就好) -3. 安装 `adb`, 并修改 `resource/config.json` 中 `Custom`.`adb`.`path` 的值为 `"adb"` +3. 安装 `adb` 4. 复制资源文件到 `libMeoAssitant.so` 同一目录下 ```sh diff --git a/docs/en/LINUX_TUTORIAL.md b/docs/en/LINUX_TUTORIAL.md index cee3069dee..faa1e6710d 100644 --- a/docs/en/LINUX_TUTORIAL.md +++ b/docs/en/LINUX_TUTORIAL.md @@ -14,11 +14,11 @@ Please search the tutorial and install. Nothing to mention. The version `4.5.3` ### PaddleOCR -1. Use a hacked version: https://github.com/MistEO/PaddleOCR. -2. Refer to [this tutorial](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.3/deploy/cpp_infer#readme). -3. [Download](https://paddleinference.paddlepaddle.org.cn/master/user_guides/download_lib.html) extra dependencies for `PaddlePaddle`. Both `avx` and `mkl` are recommended, which can improve the efficiency of calculation. However, if your CPU does not support them, you can choose compatible version of either `noavx` or `openblas` (new CPUs should support them, even AMD). `cuda` and `cudnn` are GPU libraries, but I haven't tried it on `PaddleOCR` yet. Feel free to try it out. -4. If `cmake` cannot find `Opencv`, you can try editing [the finding path of Opencv](https://github.com/MistEO/PaddleOCR/blob/release/2.3/deploy/cpp_infer/CMakeLists.txt#L49). -5. If you are using `MKL` version, you can change the [MKL Macro](https://github.com/MistEO/PaddleOCR/blob/release/2.3/deploy/cpp_infer/include/ocr_defines.h#L9) to `true` to improve performance. +1. Use a hacked version: +2. Refer to [this tutorial](https://github.com/MaaAssistantArknights/PaddleOCR/blob/release/2.5/deploy/cpp_infer/readme.md). +3. [Download](https://paddleinference.paddlepaddle.org.cn/master/user_guides/download_lib.html) extra dependencies for `paddle_inference`. Both `avx` and `mkl` are recommended, which can improve the efficiency of calculation. However, if your CPU does not support them, you can choose compatible version of either `noavx` or `openblas` (new CPUs should support them, even AMD). `cuda` and `cudnn` are GPU libraries, but I haven't tried it on `PaddleOCR` yet. Feel free to try it out. +4. If `cmake` cannot find `Opencv`, you can try editing [the finding path of Opencv](https://github.com/MaaAssistantArknights/PaddleOCR/blob/release/2.5/deploy/cpp_infer/CMakeLists.txt#L49). +5. If you are using **NOT** `MKL` version, you need to change the [MKL Macro](https://github.com/MaaAssistantArknights/PaddleOCR/blob/release/2.5/deploy/cpp_infer/src/args.cpp#L24) to `false`. Compilation flags for your reference @@ -42,7 +42,7 @@ If zlib does not exist in other distribution, you can try compiling from [source 1. Copy the compiled 3rd-party library to `3rdparty/lib` or change `CMakeLists.txt` to indicate 3rd-party library path manually. 2. The header files in `3rdparty/include/opencv` is version `4.5.3`. If you are using other versions, please notice there may be conflicts in header files (you can simply replace them with your `opencv` header files). -3. Install `adb`, and change `resource/config.json` - `Custom.adb.path` to `"adb"` +3. Install `adb` 4. Copy resource files to the same folder of `libMeoAssitant.so`. ```sh