The tutorial requires some basic knowledge about Linux OS!
Though it is unclear why it needs to run in Linux... Anyway in case somebody needs it_(:з」∠)_
If you meet any other problems, please feel free to submit issue to us.
Please search the tutorial and install. Nothing to mention. The version 4.5.3
is confirmed to be able to use. Other versions should be OK as well, but 4.5.3
is recommended to keep it the same as the project and avoid some unnecessary problems. Installing Opencv
itself is enough. opencv_contrib
is not required.
- Use a hacked version: https://github.com/MaaAssistantArknights/PaddleOCR
- Refer to this tutorial.
- Download extra dependencies for
paddle_inference
. Bothavx
andmkl
are recommended, which can improve the efficiency of calculation. However, if your CPU does not support them, you can choose compatible version of eithernoavx
oropenblas
(new CPUs should support them, even AMD).cuda
andcudnn
are GPU libraries, but I haven't tried it onPaddleOCR
yet. Feel free to try it out. - If
cmake
cannot findOpencv
, you can try editing the finding path of Opencv. - If you are using NOT
MKL
version, you need to change the MKL Macro tofalse
.
Compilation flags for your reference
cmake ../ -DPADDLE_LIB=/your_path/paddle_inference/ -DOpenCV_DIR=/your_path_to_opencv/ -DWITH_STATIC_LIB=OFF -DBUILD_SHARED=ON
# If your device does not support MKL, you can add `-DWITH_MKL=OFF` flag, and download corresponding PaddlePaddle version.
In Ubuntu:
sudo apt update && sudo apt install zlib1g-dev
sudo ldconfig
If zlib does not exist in other distribution, you can try compiling from source.
- Copy the compiled 3rd-party library to
3rdparty/lib
or changeCMakeLists.txt
to indicate 3rd-party library path manually. - The header files in
3rdparty/include/opencv
is version4.5.3
. If you are using other versions, please notice there may be conflicts in header files (you can simply replace them with youropencv
header files). - Install
adb
- Copy resource files to the same folder of
libMeoAssitant.so
.
cd tools
sh ./update_resource.sh <YourBuildDir>
- Call by Python interface or C interface, requiring you to write some code.
cmake
can compile a demo for testing by adding-DBUILD_TEST=ON
flag
Refer to the implementation of __main__
in Python demo
Refer to the implementation of TestCaller
Refer to the implementation of MeoAsstGui