1.首先下載並安裝python3.7.8
注:安裝時Add path勾選
2.進入命令提示符界面
3.升級pip版本
python -m pip install --upgrade pip
4.安裝PaddlePaddle
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
5.檢查PaddlePaddle是否成功
python
import paddle.fluid as fluid
fluid.install_check().run_check()
出現Your Paddle Fluid is installed successfully! Let's start deep Learning with Paddle Fluid now,表示安裝成功
6.下載shapely安裝包
7.拷貝shapely安裝包到Python安裝目錄下的libs文件夾
進入該目錄后,執行pip install Shapely-1.7.1-cp37-cp37m-win_amd64.whl
8.使用git工具下載運行庫
git clone https://github.com/PaddlePaddle/PaddleOCR
或者:git clone https://gitee.com/paddlepaddle/PaddleOCR
9.進入下載庫PaddleOCR文件夾
python -m pip install -r requirements.txt
10.下載訓練庫
ch_ppocr_mobile_v1.1_rec_infer.tar
ch_ppocr_mobile_v1.1_cls_infer.tar
ch_ppocr_mobile_v1.1_det_infer.tar
解壓后拷貝到對應的文件夾中(新建文件夾,名字一定不要錯哦),
11.測試實例
python tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_ppocr_mobile_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_mobile_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True --use_gpu=False
12.顯示結果
終於把坑填滿了,HAHA
2020-12-29