PaddleOCR—PPstructure在Windows环境下搭建及使用

文章介绍了如何使用PaddlePaddle的PaddleOCR工具进行ppstructure模型的部署,包括环境配置、模型下载、依赖安装和图像识别处理的步骤。用户需根据需求选择CPU或GPU版本,并从GitHub的model-list下载模型,利用国内镜像源加速安装过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. ppstructure的github地址:https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.6/ppstructure

2.  所需环境:我的环境是py 3.8

        首先需要拉取paddleocr的源码:

https://github.com/PaddlePaddle/PaddleOCR.git

然后就是在ppstructure中创建inference文件夹放置模型

 

模型可以根据自己的需求在github上的model-list找寻下载。

3. 安装依赖

安装paddleocr依赖

pip install -r requirements.txt 

安装paddlepaddle

python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

以上的是cpu版本,需要gpu版本可以去github看看。在这里提醒一下,建议pip源用国内的清华源,不然下载容易断链接不稳定

安装paddleocr的whl包

 pip install "paddleocr>=2.6.0.3"

pip install paddleclas>=2.4.3

4. 图像识别处理

python predict_system.py --image_dir=.\docs\table\table10.jpg --det_model_dir=.\inference\ch_PP-OCRv3_det_infer --rec_model_dir=.\inference\ch_PP-OCRv3_rec_infer --rec_char_dict_path=..\ppocr\utils\ppocr_keys_v1.txt --table_model_dir=inference\ch_ppstructure_mobile_v2.0_SLANet_infer --table_char_dict_path=..\ppocr\utils\dict\table_structure_dict.txt --layout_model_dir=inference\picodet_lcnet_x1_0_fgd_layout_cdla_infer --layout_dict_path=..\ppocr\utils\dict\layout_dict\layout_cdla_dict.txt --vis_font_path=..\doc\fonts\simfang.ttf --recovery=True --output=..\output\ 在cmd的ppstructure目录下输入此指令即可,根据自己的模型以及文件进行相应更改

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值