PaddleOCR超轻量级中文OCR模型使用(windows爬坑)
·
1.第一个坑: 出现在Recognition model下载解压,也就是下图这个文件,我用自己的笔记本和一个台式机解压,两台机器均是windows的系统,并没有出现,教程里说的model和params文件。反复尝试无果后,我用朋友的Mac解压了这个模型文件,问题解决!目前只知道如何解决这个问题,但是仍不知其因。

2.第二个坑: 出现在模型使用中,官方给的调用命令行如下:
# If you want to use the CPU for prediction, you need to set the use_gpu parameter to False
python3 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
实际使用中,会出现地址不对的问题,尝试多次后,发现img_dir、det_model_dir等参数,在源码中已规定为字符串,所以再使用双引号(""),就导致路径不对,去掉双引号即可,如下:
python tools/infer/predict_system.py --image_dir=./images/ --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
PaddleOCR源码下载:https://github.com/PaddlePaddle/PaddleOCR
更多推荐


所有评论(0)