Windows安裝PP OCR步驟
1、安裝python
版本要求:python:3.6+
pip:20.2.2+
1、創建 inference 文件夾
2、在inference文件夾下安裝模型:
ch_ppocr_mobile_v2.0_cls_infer
ch_ppocr_mobile_v2.0_det_infer
ch_ppocr_mobile_v2.0_rec_infer
查看:\deploy\hubserving\ocr_system\params.py配置安裝模型是否正確
3、安裝paddlehub:——default-timeout設置超時時間
pip3 install paddlehub --upgrade -i
https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=10000
pip3 install paddlepaddle --upgrade -i
https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=10000
其他依賴包(根據缺少依賴提示情況而定)
pip3 install imgaug -i
https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install pyclipper -i
https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install lmdb -i
https://pypi.tuna.tsinghua.edu.cn/simple
4、安裝服務模塊:
hub install deploy\hubserving\ocr_system\
5、啟動服務:(使用CPU方式啟動,use_gpu = false)
hub serving start -c D:\software\PaddleOCR\deploy\hubserving\ocr_system\config.json
PS:
1、查看python版本命令:python --version
2、查看pip版本命令:python -m pip --version
3、更新pip版本命令:pip install --upgrade pip