PaddleOCRSharp 4.5.0.1

dotnet add package PaddleOCRSharp --version 4.5.0.1                
NuGet\Install-Package PaddleOCRSharp -Version 4.5.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PaddleOCRSharp" Version="4.5.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PaddleOCRSharp --version 4.5.0.1                
#r "nuget: PaddleOCRSharp, 4.5.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PaddleOCRSharp as a Cake Addin
#addin nuget:?package=PaddleOCRSharp&version=4.5.0.1

// Install PaddleOCRSharp as a Cake Tool
#tool nuget:?package=PaddleOCRSharp&version=4.5.0.1                

简体中文 | English |更新记录

如果项目对你有用或者喜欢,那就点个赞★ 。谢谢!

介绍


PaddleOCRSharp 是一个基于百度飞桨PaddleOCR的开源代码修改并优化的.NET版本OCR可离线使用类库。项目核心组件PaddleOCR.dll,由C++编写,根据百度飞桨PaddleOCR的C++代码修改并优化而成。目前已经支持C\C++、.NET、Python、Golang、Rust、java等众多开发语言的直接API接口调用。项目包含文本识别、文本检测、表格识别功能。本项目针对小图识别不准的情况下做了优化,同时做了其他优化,比飞桨原代码识别准确率有所提高,速度更快。包含总模型仅8.6M的超轻量级中文OCR,单模型支持中英文数字组合识别、竖排文本识别、长文本识别。同时支持中英文、纯英文以及多种语言文本检测识别。

PaddleOCRSharp封装极其简化,实际调用仅几行代码,极大的方便了中下游开发者的使用和降低了PaddleOCR的使用入门级别,同时提供不同的.NET框架使用,方便各个行业应用开发与部署。Nuget包即装即用,可以离线部署,不需要网络就可以识别的高精度中英文OCR。

本项目支持官方所有公开的通用OCR模型,如:PPOCRV2、PPOCRV3、PPOCRV4、PP-OCRv4_server、PP-OCRv4_server_doc(1.5万字符字典模型)。最新版默认使用中英文V4模型(ch_PP-OCRv4):

★windows系统支持:win7SP1、win10、win11、winserver2012R2、winserver2016、winserver2019、winserver2022等。免费版支持在x86的CPU上使用,CPU指令集需要包含AVX指令集。

★windows下版本有免费开源版、CPU加速版(付费版)、GPU加速版(付费版)

★linux系统支持(付费版):统信UOS、麒麟、ubuntu、CentOS8等绿色离线部署,支持docker部署。支持国产CPU如华为鲲鹏、飞腾、海光、兆芯等CPU。

本项目目前支持以下.NET框架(linux版本仅支持net6.0及以上框架):

net35;net40;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;
netstandard2.0;netcoreapp3.1;
net5.0;net6.0;net7.0;net8.0;net9.0

特点

★ $\color{#0000FF}{高度集成}$:PaddleOCRSharp将百度飞桨PaddleOCR的核心功能完美集成到.NET平台,让开发者无需关心底层实现,只需调用相应接口即可实现OCR功能。

★ $\color{#0000FF}{性能卓越}$:得益于百度飞桨PaddleOCR的高效算法和对PaddleOCR代码的部分算法优化,PaddleOCRSharp在保持高度集成的同时,也保证了卓越的性能表现。

★ $\color{#0000FF}{易于使用}$:PaddleOCRSharp提供了丰富的API接口和详细的文档说明,让开发者能够轻松上手,快速实现OCR功能。

★ $\color{#0000FF}{扩展性强}$:PaddleOCRSharp支持自定义模型加载和训练,开发者可以根据自己的需求进行模型扩展和优化。

★ $\color{#FF0000}{离线免费}$:PaddleOCRSharp支持离线绿色部署,无其他依赖需要安装,满足了众多开发者的福音。

应用场景

PaddleOCRSharp适用于各种需要OCR技术的.NET开发场景,如文档数字化处理、自动识别表单数据、车牌识别等。无论是企业级应用还是个人开发者,PaddleOCRSharp都能提供强大的OCR支持。

如何使用

本项目提供了两个SDK,一个是C++版本,一个是.net版本,.net版本是对C++版本的二次封装,其他语言开发亦是调用C++版本。同时也提供了Go、Python、C++的调用示例代码

博客园文章:NET框架下如何使用PaddleOCRSharp

1.文件夹结构
PaddleOCRSharp      //该文件夹包含.NET对PaddleOCR封装类库项目
Demo                //该文件夹包含OCR示例Demo文件夹
|--Cpp              //C++调用示例项目
|--CSharp           //.NET调用示例项目
|--python           //python调用示例项目
|--Go               //Golang调用示例项目
|--win_runtime_x64  // windows平台全部依赖文件
2. .NET版编译

.NET版编译

使用与部署


1. C++使用PaddleOCR
2. .NET使用PaddleOCRSharp
3. python使用PaddleOCR
4. Go使用PaddleOCR
5. Rust使用PaddleOCR

OCR模型


OCR识别模型库支持官方所有的模型,也支持自己训练的模型。完全按照飞桨OCR接口搭桥。 本项目部署自带的一种轻量版8.6M模型库、服务器版模型库(更准确,需要自行下载),可以自行更改模型库适用实际需求。

模型名称 模型大小 下载地址 备注
ch_PP-OCRv2 10M 中英文轻量v2
en_PP-OCRv2 4M 英文数字v2
ch_PP-OCRv3 12M 中英文轻量v3
en_PP-OCRv3 10M 英文数字v3
ch_PP-OCRv4 14M 中英文轻量v4
en_PP-OCRv4 12M 英文数字v4

更多PaddleOCR模型可以去飞桨官方下载

PaddleOCRSharp适合哪些场景

PaddleOCRSharp主要应用场景:

文档数字化处理: 对于大量的纸质文档,PaddleOCRSharp可以快速地将其转化为电子文档,方便存储、检索和编辑。这在企业级应用中尤为重要,如图书馆、档案馆、政府部门等需要对大量文档进行数字化处理的场景。

自动识别表单数据: 在需要自动化处理表单数据的场景中,PaddleOCRSharp可以识别表单中的文字信息,并将其转化为结构化数据。这大大提高了数据录入的效率和准确性,特别适用于银行、保险、医疗等行业需要处理大量表单数据的场景。

车牌识别: PaddleOCRSharp也支持车牌识别功能,可以准确地识别出车辆的车牌号码。这对于交通管理、停车场管理、安防监控等场景非常有用,可以帮助实现车辆的快速识别和追踪。

图像文字提取: 在需要从图像中提取文字信息的场景中,如从截图、图片或PDF文件中提取文字,PaddleOCRSharp都能提供高精度的识别结果。这对于研究人员、学者、学生等需要处理大量图像文字信息的用户来说非常便捷。

多语言识别: PaddleOCRSharp支持多种语言的识别,包括中文、英文等常用语言。这使得它可以在国际化的应用场景中发挥重要作用,如跨境电商、国际交流等领域。

定制化需求: 对于有特殊需求的用户,PaddleOCRSharp提供了丰富的接口和模型库,可以根据具体需求进行定制化和扩展。这为用户提供了更多的灵活性和可能性,可以满足不同场景下的特定需求。 PaddleOCRSharp凭借其强大的OCR功能和广泛的应用场景,成为了.NET开发者在处理OCR任务时的有力工具。无论是企业级应用还是个人开发者,都可以通过PaddleOCRSharp快速实现OCR功能,提高工作效率和数据处理的准确性。

常见问题与解决方案

常见问题与解决方案

技术交流方式


QQ技术交流群:318860399
微信公众号:明月心技术学堂。

输入图片说明 输入图片说明

个人博客地址: https://www.cnblogs.com/raoyutian/

定制开发联系QQ:277784829


如果您在工作中受益于该项目,请考虑下支持我的工作。

输入图片说明

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net35 is compatible.  net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on PaddleOCRSharp:

Package Downloads
Starxcjy.DataAccess.CodeReader

图像处理库

Docimax.OCR.Core

Package Description

ObtSDK

AUTOMATION Android SDK By Ông Bán Tất

RG3.PF.MklPaddleOCR

1、【RG3.PF.MklPaddleOCR】(数学计算函数和方法等) 5、使用请到github获取 RG3.PF.WebApp.Host 6、6.0.0.77开始,nodeserice迁移到RG3.PF.PinYinScriptEngineCliWrap 7、https://github.com/MKL-NET/MKL.NET 8、https://gitee.com/raoyutian/paddle-ocrsharp 9、https://gitee.com/paddlepaddle/PaddleOCR

PaddleOcrCutPic

兼容4.7

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on PaddleOCRSharp:

Repository Stars
ZGGSONG/STranslate
A ready-to-go translation ocr tool developed with WPF/WPF 开发的一款即用即走的翻译、OCR工具
xksoft/OcrHelper
桌面图像实时转文字工具
laosanyuan/HuoHuan
互联网微信群聊二维码获取工具
Version Downloads Last updated
4.5.0.1 473 3/22/2025
4.4.0.2 8,449 10/30/2024
4.4.0.1 5,506 8/14/2024
4.3.0 9,527 5/23/2024
4.2.0 5,130 3/26/2024
4.1.0 6,549 1/10/2024
4.0.2 11,180 11/2/2023
3.1.1 3,792 9/15/2023
3.1.0 14,476 5/17/2023
3.0.0 7,497 4/3/2023