字符识别之PaddleOcr介绍、安装与应用
ztj100 2025-04-26 22:41 34 浏览 0 评论
- paddleocr介绍
paddleocr是一款轻量型字符识别工具库,支持多语言识别,支持pip安装与自定义训练。详细信息如下表所示。
名称 | 许可证 | 当前版本 | 下载地址(github地址) | 支持语言 | 运行方式pip安装 |
PaddleOCR | Apache 2.0 license | PaddleOCR v2.3 | https://gitee.com/paddlepaddle/PaddleOCR?utm_source=alading&utm_campaign=repo | python等 | 安装相应的pip即可,或者下载github源码 |
2. paddleocr安装
在python环境中,运行pip命令:
pip install "paddleocr>=2.0.1"
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
在执行安装命令之前需要配置完成一些必要的库,参考requments.txt安装如下的包:
shapely、scikit-image==0.17.2、imgaug==0.4.0、pyclipper、lmdb
tqdm、numpy、visualdl、python-Levenshtein、opencv-contrib-python==4.4.0.46
lxml、premailer、openpyxl
此外还需要安装paddlepaddle以及必须的模型等。模型下载地址:
模型信息:
下载:!wget
https://paddleocr.bj.bcebos.com/inference.tar 并且需要将模型放在固定位置
模型信息:https://gitee.com/paddlepaddle/PaddleOCR/blob/release/2.3/doc/doc_ch/models_list.md
官方文档:
https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.0/doc/doc_ch
https://www.bookstack.cn/read/PaddleOCR/quickstart.md
3. 测试
提供两种测试方式,一种是pip方式,一种以命令行的源码启动。以下图为例进行测试。
对代码方式运行结果如下:
左右两边分别对应原图标识和结果。对命令行启动步骤如下(以需要下载模型为例)
- 在github或其他相关网页上找到需要下载的模型,一般会有两个模型,分别是检测模型和识别模型。下载完成后在源码路径下新建inference文件夹,然后将模型解压放在该文件夹下。
- 使用命令
>python tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_PP-OCRv2_det_slim_quant_infer/" --rec_model_dir="./inference/ch_PP-OCRv2_rec_slim_quant_infer/" --use_gpu=False
* use_gpu=False表示不使用GPU。
完成后结果保存在源码路径下的inference_results文件夹下。可以看出更换模型后效果较默认模型要好。
这里使用官方图像进行测试的结果。
4. paddleocr训练
paddleocr提供完全的训练方式,具体方式可参考官方文档进行处理。官方提供了标注工具,界面启动和截图如下。在PaddleOcr源码下PPOCRLabel文件夹下执行命令(需要先安装pyqt):
python PPOCRLabel.py --lang ch
执行后界面如下:
- 上一篇:14个品牌!64支唇膏使用心得报告
- 下一篇:2016年1月彩妆记录
相关推荐
- 10条军规:电商API从数据泄露到高可用的全链路防护
-
电商API接口避坑指南:数据安全、版本兼容与成本控制的10个教训在电商行业数字化转型中,API接口已成为连接平台、商家、用户与第三方服务的核心枢纽。然而,从数据泄露到版本冲突,从成本超支到系统崩溃,A...
- Python 文件处理在实际项目中的困难与应对策略
-
在Python项目开发,文件处理是一项基础且关键的任务。然而,在实际项目中,Python文件处理往往会面临各种各样的困难和挑战,从文件格式兼容性、编码问题,到性能瓶颈、并发访问冲突等。本文将深入...
- The Future of Manufacturing with Custom CNC Parts
-
ThefutureofmanufacturingisincreasinglybeingshapedbytheintegrationofcustomCNC(ComputerNumericalContro...
- Innovative Solutions in Custom CNC Machining
-
Inrecentyears,thelandscapeofcustomCNCmachininghasevolvedrapidly,drivenbyincreasingdemandsforprecisio...
- C#.NET serilog 详解(c# repository)
-
简介Serilog是...
- Custom CNC Machining for Small Batch Production
-
Inmodernmanufacturing,producingsmallbatchesofcustomizedpartshasbecomeanincreasinglycommondemandacros...
- Custom CNC Machining for Customized Solutions
-
Thedemandforcustomizedsolutionsinmanufacturinghasgrownsignificantly,drivenbydiverseindustryneedsandt...
- Revolutionizing Manufacturing with Custom CNC Parts
-
Understandinghowmanufacturingisevolving,especiallythroughtheuseofcustomCNCparts,canseemcomplex.Thisa...
- Breaking Boundaries with Custom CNC Parts
-
BreakingboundarieswithcustomCNCpartsinvolvesexploringhowadvancedmanufacturingtechniquesaretransformi...
- Custom CNC Parts for Aerospace Industry
-
Intherealmofaerospacemanufacturing,precisionandreliabilityareparamount.Thecomponentsthatmakeupaircra...
- Cnc machining for custom parts and components
-
UnderstandingCNCmachiningforcustompartsandcomponentsinvolvesexploringitsprocesses,advantages,andcomm...
- 洞察宇宙(十八):深入理解C语言内存管理
-
分享乐趣,传播快乐,增长见识,留下美好。亲爱的您,这里是LearingYard学苑!今天小编为大家带来“深入理解C语言内存管理”...
- The Art of Crafting Custom CNC Parts
-
UnderstandingtheprocessofcreatingcustomCNCpartscanoftenbeconfusingforbeginnersandevensomeexperienced...
- Tailored Custom CNC Solutions for Automotive
-
Intheautomotiveindustry,precisionandefficiencyarecrucialforproducinghigh-qualityvehiclecomponents.Ta...
- 关于WEB服务器(.NET)一些经验累积(一)
-
以前做过技术支持,把一些遇到的问题累积保存起来,现在发出了。1.问题:未能加载文件或程序集“System.EnterpriseServices.Wrapper.dll”或它的某一个依赖项。拒绝访问。解...
你 发表评论:
欢迎- 一周热门
- 最近发表
-
- 10条军规:电商API从数据泄露到高可用的全链路防护
- Python 文件处理在实际项目中的困难与应对策略
- The Future of Manufacturing with Custom CNC Parts
- Innovative Solutions in Custom CNC Machining
- C#.NET serilog 详解(c# repository)
- Custom CNC Machining for Small Batch Production
- Custom CNC Machining for Customized Solutions
- Revolutionizing Manufacturing with Custom CNC Parts
- Breaking Boundaries with Custom CNC Parts
- Custom CNC Parts for Aerospace Industry
- 标签列表
-
- idea eval reset (50)
- vue dispatch (70)
- update canceled (42)
- order by asc (53)
- spring gateway (67)
- 简单代码编程 贪吃蛇 (40)
- transforms.resize (33)
- redisson trylock (35)
- 卸载node (35)
- np.reshape (33)
- torch.arange (34)
- npm 源 (35)
- vue3 deep (35)
- win10 ssh (35)
- vue foreach (34)
- idea设置编码为utf8 (35)
- vue 数组添加元素 (34)
- std find (34)
- tablefield注解用途 (35)
- python str转json (34)
- java websocket客户端 (34)
- tensor.view (34)
- java jackson (34)
- vmware17pro最新密钥 (34)
- mysql单表最大数据量 (35)