Skip to content

📄 Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

Update README

SWHL04c539e060ba
diff --git a/README.md b/README.md
index 5b1d0e7..6f53734 100755
--- a/README.md
+++ b/README.md
@@ -35,16 +35,12 @@
- [生态框架](#生态框架)
- [在线demo](#在线demo)
- [TODO](#todo)
- - [模型相关](#模型相关)
- - [各个版本ONNX模型效果对比](#各个版本onnx模型效果对比)
- - [文本检测模型(仅供参考)](#文本检测模型仅供参考)
- - [文本识别模型(仅供参考)](#文本识别模型仅供参考)
- [原始发起者及初创作者](#原始发起者及初创作者)
- [致谢](#致谢)
- [赞助](#赞助)
- [版权声明](#版权声明)
- [授权](#授权)
- - [联系我们](#联系我们)
+ - [加入我们](#加入我们)
- [示例图](#示例图)
- [C++/JVM示例图像](#cjvm示例图像)
- [.Net示例图像](#net示例图像)
@@ -57,7 +53,7 @@
## 简介
- 💖目前已知**运行速度最快、支持最广**,完全开源免费并支持离线部署的多平台多语言OCR。
-- **中文广告**: 欢迎加入我们的QQ群下载模型及测试程序,qq群号:887298230
+- **中文广告**: 欢迎加入我们的QQ群下载模型及测试程序,QQ群号:887298230
- **缘起**:百度paddlepaddle工程化不是太好,为了方便大家在各种端上进行ocr推理,我们将它转换为onnx格式,使用`Python/C++/Java/Swift/C#` 将它移植到各个平台。
- **名称来源**: 轻快好省并智能。基于深度学习技术的OCR技术,主打人工智能优势及小模型,以速度为使命,效果为主导。
- 基于百度的开源PaddleOCR 模型及训练,任何人可以使用本推理库,也可以根据自己的需求使用百度PaddlePaddle框架进行模型优化。
@@ -84,10 +80,9 @@
- [垂直项目](./docs/related_projects.md)
- [RapidVideOCR](https://github.com/SWHL/RapidVideOCR):基于RapidOCR,提取视频中的硬字幕
- [LGPMA_Infer](https://github.com/SWHL/LGPMA_Infer): 表格结构还原 | [博客解读论文和源码](http://t.csdn.cn/QNN3S)
-- 模型转换
- - [PaddleOCRModelConverter](https://github.com/RapidAI/PaddleOCRModelConverter)
- - [Paddle2OnnxConvertor](https://github.com/RapidAI/Paddle2OnnxConvertor)
- - [手把手教你使用ONNXRunTime部署PP-OCR](https://aistudio.baidu.com/aistudio/projectdetail/1479970?channelType=0&channel=0)
+- [模型相关](./docs/models.md)
+ - [模型转换](./docs/models.md#模型转换)
+ - [模型下载及效果对比](./docs/models.md#模型下载)
- [常见问题 FAQ](./docs/FAQ.md)
@@ -145,35 +140,6 @@ flowchart LR
- [ ] iOS范例: 等待有缘人贡献代码
- [ ] 依据python版本重写C++推理代码,以提升推理效果,并增加对gif/tga/webp 格式图片的支持
-## 模型相关
-- 可以直接下载使用的模型 ([百度网盘](https://pan.baidu.com/s/1PTcgXG2zEgQU6A_A3kGJ3Q?pwd=jhai) | [Google Drive](https://drive.google.com/drive/folders/1x_a9KpCo_1blxH1xFOfgKVkw1HYRVywY?usp=sharing))
-
-|模型名称|模型简介|模型大小|备注|
-|:---:|:---:|:---:|:---:|
-|⭐ ch_PP-OCRv3_det_infer.onnx|轻量文本检测模型|2.23M|较v1轻量检测,精度有较大提升 from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/README_ch.md#pp-ocr%E7%B3%BB%E5%88%97%E6%A8%A1%E5%9E%8B%E5%88%97%E8%A1%A8%E6%9B%B4%E6%96%B0%E4%B8%AD)|
-|⭐ ch_PP-OCRv2_rec_infer.onnx|轻量文本识别模型|7.79M||
-
-### 各个版本ONNX模型效果对比
-#### 文本检测模型(仅供参考)
-- 测试集:自己构建`中英文(111个,包含卡证、文档和自然图像)`
-
-| 模型 | infer_Speed(s/img) | precision | recall | hmean | 模型大小 |
-| :---------------------------------: | :----------------: | :-------: | :----: | :----: | :------: |
-| ch_ppocr_mobile_v2.0_det_infer.onnx | 0.4345742 | 0.7277 | 0.8413 | 0.7785 | 2.3M |
-| ch_PP-OCRv2_det_infer.onnx | 0.5116553 | 0.7817 | 0.8472 | 0.8123 | 2.3M |
-| ch_PP-OCRv3_det_infer.onnx | 0.5723512 | **0.7740** | **0.8837** | **0.8237** | 2.4M |
-
-#### 文本识别模型(仅供参考)
-- 测试集: 自己构建`中英文(168个)`
-
-| 模型 | infer_Speed(s/img) | Score | Exact_Match | Char_Match | 模型大小 |
-| :---------------------------------: | :------------------: | :-------: | :--------------: | :-------------: | :--: |
-| ch_ppocr_mobile_v2.0_rec_infer.onnx | 0.0111 | **0.7287** | **0.5595** | 0.8979 | 4.3M |
-| ch_PP-OCRv2_rec_infer.onnx | 0.0193 | 0.6955 | 0.4881 | **0.9029** | 8.0M |
-| ch_PP-OCRv3_rec_infer.onnx | 0.0145 | 0.5537 | 0.3274 | 0.7800 | 11M |
-| ch_PP-OCRv3_rec_train_student.onnx | 0.0157 | 0.5537 | 0.3274 | 0.7800 | 11M |
-| ch_PP-OCRv3_rec_train_teacher.onnx | 0.0140 | 0.5381 | 0.3095 | 0.7667 | 11M |
-
## 原始发起者及初创作者
<p align="left">
@@ -205,9 +171,8 @@ flowchart LR
- OCR模型版权归百度所有,其它工程代码版权归本仓库所有者所有。
- 本软件采用Apache 授权方式,欢迎大家贡献代码,提交issue 甚至PR。
-## 联系我们
-- 您可以通过QQ群联系到我们:**887298230**
-- 群号搜索不到时,请直接点此[**链接**](https://jq.qq.com/?_wv=1027&k=P9b3olx6),找到组织
+## 加入我们
+- 可以通过QQ群加入我们:**887298230**
- 用QQ扫描以下二维码:
<div align="center">
diff --git a/android/README.md b/android/README.md
index b94d74e..c45120f 100755
--- a/android/README.md
+++ b/android/README.md
@@ -1,6 +1,3 @@
# Android版Ocr范例
-#### 介绍
-* ~~本目录存放Android相关demo项目~~
-* ~~* BaiPiaoOcrAndroidOnnx项目是Android平台范例,采用onnxruntime为推理框架~~
-* 为方便管理,此文件夹代码不再更新,Android demo移至[RapidOcrAndroidOnnx](https://github.com/RapidAI/RapidOcrAndroidOnnx)
+此文件夹代码不再更新,Android demo移至 [RapidOcrAndroidOnnx](https://github.com/RapidAI/RapidOcrAndroidOnnx)
diff --git a/cpp/README.md b/cpp/README.md
index 3c61c70..3d7947a 100755
--- a/cpp/README.md
+++ b/cpp/README.md
@@ -1,11 +1,13 @@
## RapidOCR C++ version
### C++项目使用onnxruntime和ncnn两种推理框架,实现了2种版本
-### onnxruntime版:[RapidOcrOnnx](https://github.com/RapidAI/RapidOcrOnnx)
-### ncnn版:[RapidOcrNcnn](https://github.com/RapidAI/RapidOcrNcnn)
-### 以下内容停止更新
+- onnxruntime版:[RapidOcrOnnx](https://github.com/RapidAI/RapidOcrOnnx)
+- ncnn版:[RapidOcrNcnn](https://github.com/RapidAI/RapidOcrNcnn)
+### 以下内容停止更新
- [RapidOCR C++ version](#rapidocr-c-version)
+ - [C++项目使用onnxruntime和ncnn两种推理框架,实现了2种版本](#c项目使用onnxruntime和ncnn两种推理框架实现了2种版本)
+ - [以下内容停止更新](#以下内容停止更新)
- [Project下载](#project下载)
- [Demo下载(Win、mac、linux)](#demo下载winmaclinux)
- [模型下载](#模型下载)
diff --git a/docs/README_en.md b/docs/README_en.md
index 5ed62af..6fa08d7 100644
--- a/docs/README_en.md
+++ b/docs/README_en.md
@@ -3,7 +3,7 @@
<img src="../assets/RapidOCR_LOGO.png" width="55%" height="55%"/>
</div>
-# RapidOCR (Open source OCR for the security of the digital world)
+# RapidOCR (Open source OCR for the security of the digital world)
[简体中文](../README.md) | English
@@ -23,7 +23,7 @@
<details>
<summary>Contents</summary>
-- [RapidOCR (Open source OCR for the security of the digital world)](#rapidocr-open-source-ocr-for-the-security-of-the-digital-world)
+- [RapidOCR (Open source OCR for the security of the digital world)](#rapidocr-open-source-ocr-for-the-security-of-the-digital-world)
- [Introduction](#introduction)
- [Navigation](#navigation)
- [Recently updates(more)](#recently-updatesmore)
@@ -33,16 +33,11 @@
- [Overall Framework](#overall-framework)
- [Demo](#demo)
- [TODO](#todo)
- - [Model related](#model-related)
- - [Download models(Baidu NetDisk | Google Drive)](#download-modelsbaidu-netdisk--google-drive)
- - [Compared](#compared)
- - [Text Det](#text-det)
- - [Text Recognition](#text-recognition)
- [Original initiator and start-up author](#original-initiator-and-start-up-author)
- [Acknowledgements](#acknowledgements)
- [Sponsor](#sponsor)
- [Authorization](#authorization)
- - [Contact us](#contact-us)
+ - [Join us](#join-us)
- [Demo](#demo-1)
- [Demonstration with C++/JVM](#demonstration-with-cjvm)
- [Demonstration with .Net](#demonstration-with-net)
@@ -85,6 +80,9 @@
- [PaddleOCRModelConverter](https://github.com/RapidAI/PaddleOCRModelConverter)
- [Paddle2OnnxConvertor](https://github.com/RapidAI/Paddle2OnnxConvertor)
- [Teach you to use ONNXRunTime to deploy PP-OCR](https://aistudio.baidu.com/aistudio/projectdetail/1479970?channelType=0&channel=0)
+- [About model](../docs/models.md)
+ - [Model Convert](../docs/models.md#模型转换)
+ - [Model Download](../docs/models.md#模型下载)
- [FAQ](../docs/FAQ.md)
## Recently updates([more](./change_log_en.md))
@@ -139,31 +137,6 @@ flowchart LR
- [ ] iOS example: waiting for someone to contribute code
- [ ] Rewrite the C++ reasoning code according to the python version to improve the reasoning effect, and add support for gif/tga/webp format pictures
-## Model related
-#### Download models([Baidu NetDisk](https://pan.baidu.com/s/1mkirNltJS481In4g81jP3w?pwd=zy37) | [Google Drive](https://drive.google.com/drive/folders/1x_a9KpCo_1blxH1xFOfgKVkw1HYRVywY?usp=sharing))
-
-
-### Compared
-#### Text Det
-- test dataset: `Chinese and English (111, including cards, documents and natural images)`
-
-| Model | infer_Speed(s/img) | precision | recall | hmean | Model Size |
-| :---------------------------------: | :----------------: | :-------: | :----: | :----: | :------: |
-| ch_ppocr_mobile_v2.0_det_infer.onnx | 0.4345742 | 0.7277 | 0.8413 | 0.7785 | 2.3M |
-| ch_PP-OCRv2_det_infer.onnx | 0.5116553 | 0.7817 | 0.8472 | 0.8123 | 2.3M |
-| ch_PP-OCRv3_det_infer.onnx | 0.5723512 | **0.7740** | **0.8837** | **0.8237** | 2.4M |
-
-#### Text Recognition
-- test dataset: `Chinese and English (168)`
-
-| Model | infer_speed(s/img) | Score | Exact_Match | Char_Match | Model Size |
-| :---------------------------------: | ------------------: | :-------: | :--------------: | :-------------: | :--: |
-| ch_ppocr_mobile_v2.0_rec_infer.onnx | 0.0111 | **0.7287** | **0.5595** | 0.8979 | 4.3M |
-| ch_PP-OCRv2_rec_infer.onnx | 0.0193 | 0.6955 | 0.4881 | **0.9029** | 8.0M |
-| ch_PP-OCRv3_rec_infer.onnx | 0.0145 | 0.5537 | 0.3274 | 0.7800 | 11M |
-| ch_PP-OCRv3_rec_train_student.onnx | 0.0157 | 0.5537 | 0.3274 | 0.7800 | 11M |
-| ch_PP-OCRv3_rec_train_teacher.onnx | 0.0140 | 0.5381 | 0.3095 | 0.7667 | 11M |
-
## Original initiator and start-up author
<p align="left">
<a href="https://github.com/benjaminwan"><img src="https://avatars.githubusercontent.com/u/2362051?v=4" width=65 height=65></a>
@@ -188,11 +161,10 @@ flowchart LR
## Authorization
- The copyright of the OCR model belongs to Baidu, and the copyright of other engineering codes belongs to the owner of this warehouse.
-- This software is licensed under LGPL. You are welcome to contribute code, submit an issue or even pr.
+- This software is licensed under LGPL. You are welcome to contribute code, submit an issue or even PR.
-## Contact us
+## Join us
- You can contact us through QQ group: **887298230**
-- If you can’t find the group number, please click here [**link**](https://jq.qq.com/?_wv=1027&k=P9b3olx6) to find the organization
- Scan the following QR code with QQ:
<div align="center">
diff --git a/docs/models.md b/docs/models.md
new file mode 100644
index 0000000..d6bbd71
--- /dev/null
+++ b/docs/models.md
@@ -0,0 +1,41 @@
+## 模型相关
+- [模型相关](#模型相关)
+ - [模型转换](#模型转换)
+ - [模型下载](#模型下载)
+ - [各个版本ONNX模型效果对比](#各个版本onnx模型效果对比)
+ - [文本检测模型(仅供参考)](#文本检测模型仅供参考)
+ - [文本识别模型(仅供参考)](#文本识别模型仅供参考)
+
+### 模型转换
+- [PaddleOCRModelConverter](https://github.com/RapidAI/PaddleOCRModelConverter)
+- [Paddle2OnnxConvertor](https://github.com/RapidAI/Paddle2OnnxConvertor)
+- [手把手教你使用ONNXRunTime部署PP-OCR](https://aistudio.baidu.com/aistudio/projectdetail/1479970?channelType=0&channel=0)
+
+### 模型下载
+- 可以直接下载使用的模型 ([百度网盘](https://pan.baidu.com/s/1PTcgXG2zEgQU6A_A3kGJ3Q?pwd=jhai) | [Google Drive](https://drive.google.com/drive/folders/1x_a9KpCo_1blxH1xFOfgKVkw1HYRVywY?usp=sharing))
+
+|模型名称|模型简介|模型大小|备注|
+|:---:|:---:|:---:|:---:|
+|⭐ ch_PP-OCRv3_det_infer.onnx|轻量文本检测模型|2.23M|较v1轻量检测,精度有较大提升 from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/README_ch.md#pp-ocr%E7%B3%BB%E5%88%97%E6%A8%A1%E5%9E%8B%E5%88%97%E8%A1%A8%E6%9B%B4%E6%96%B0%E4%B8%AD)|
+|⭐ ch_PP-OCRv2_rec_infer.onnx|轻量文本识别模型|7.79M||
+
+### 各个版本ONNX模型效果对比
+#### 文本检测模型(仅供参考)
+- 测试集:自己构建`中英文(111个,包含卡证、文档和自然图像)`
+
+| 模型 | infer_Speed(s/img) | precision | recall | hmean | 模型大小 |
+| :---------------------------------: | :----------------: | :-------: | :----: | :----: | :------: |
+| ch_ppocr_mobile_v2.0_det_infer.onnx | 0.4345742 | 0.7277 | 0.8413 | 0.7785 | 2.3M |
+| ch_PP-OCRv2_det_infer.onnx | 0.5116553 | 0.7817 | 0.8472 | 0.8123 | 2.3M |
+| ch_PP-OCRv3_det_infer.onnx | 0.5723512 | **0.7740** | **0.8837** | **0.8237** | 2.4M |
+
+#### 文本识别模型(仅供参考)
+- 测试集: 自己构建`中英文(168个)`
+
+| 模型 | infer_Speed(s/img) | Score | Exact_Match | Char_Match | 模型大小 |
+| :---------------------------------: | :------------------: | :-------: | :--------------: | :-------------: | :--: |
+| ch_ppocr_mobile_v2.0_rec_infer.onnx | 0.0111 | **0.7287** | **0.5595** | 0.8979 | 4.3M |
+| ch_PP-OCRv2_rec_infer.onnx | 0.0193 | 0.6955 | 0.4881 | **0.9029** | 8.0M |
+| ch_PP-OCRv3_rec_infer.onnx | 0.0145 | 0.5537 | 0.3274 | 0.7800 | 11M |
+| ch_PP-OCRv3_rec_train_student.onnx | 0.0157 | 0.5537 | 0.3274 | 0.7800 | 11M |
+| ch_PP-OCRv3_rec_train_teacher.onnx | 0.0140 | 0.5381 | 0.3095 | 0.7667 | 11M |
diff --git a/images/1.jpg b/images/1.jpg
deleted file mode 100755
index 614ef20..0000000
Binary files a/images/1.jpg and /dev/null differ
diff --git a/images/README.md b/images/README.md
deleted file mode 100755
index a677673..0000000
--- a/images/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-#### test_images_benchmark
-- 基准的测试图像,便于测试情况下统一基准,主要用于评测推理性能,侧重于速度方面。
-- 一共251张图像,类型涉及自然场景、文档类、广告海报、卡证类和手写体等样式,涉及语种为中英文。
-
-#### 下载链接
-- [百度网盘](https://pan.baidu.com/s/1R4gYtJt2G3ypGkLWGwUCKg?pwd=ceuo)
-- [Google Drive](https://drive.google.com/drive/folders/1IIOCcUXdWa43Tfpsiy6UQJmPsZLnmgFh?usp=sharing)
-
-#### 贡献者
-<p align="left">
- <a href="https://github.com/zhsunlight"><img src="https://avatars.githubusercontent.com/u/56898908?v=4" width=65 height=65></a>
-</p>
\ No newline at end of file
diff --git a/jvm/README.md b/jvm/README.md
index ef329ab..e737f30 100755
--- a/jvm/README.md
+++ b/jvm/README.md
@@ -1,10 +1,10 @@
# JVM项目
### JVM项目使用onnxruntime和ncnn两种推理框架,实现了2种版本
-### onnxruntime版:[RapidOcrOnnxJvm](https://github.com/RapidAI/RapidOcrOnnxJvm)
-### ncnn版:[RapidOcrNcnnJvm](https://github.com/RapidAI/RapidOcrNcnnJvm)
-### 以下内容停止更新
+- onnxruntime版:[RapidOcrOnnxJvm](https://github.com/RapidAI/RapidOcrOnnxJvm)
+- ncnn版:[RapidOcrNcnnJvm](https://github.com/RapidAI/RapidOcrNcnnJvm)
-## 简介
+### 以下内容停止更新
+#### 简介
本目录存放Jvm相关demo项目
1. RapidOcrOnnxJvm项目: 通过jni调用RapidOcrOnnx项目编译的动态运行库范例,内含java和kotlin调用范例,附调试和编译相关说明
\ No newline at end of file
diff --git a/python/README.md b/python/README.md
index 4be3697..0f4ee7c 100755
--- a/python/README.md
+++ b/python/README.md
@@ -206,7 +206,7 @@
|`cls_img_shape`| - |`[3, 48, 192]`| 输入方向分类模型的图像Shape(CHW) |
|`cls_batch_num`| - | 6 | 批次推理的batch大小,一般采用默认值即可,太大并没有明显提速,效果还可能会差 |
|`cls_thresh`|`[0, 1]`|0.9| 方向分类结果的置信度|
- |`label_list`| - | [0, 180] | 方向分类的标签,0°或者180°,**该参数不能动** |
+ |`label_list`| - | `[0, 180]` | 方向分类的标签,0°或者180°,**该参数不能动** |
- `Rec`部分
| 参数名称 | 取值范围 | 默认值 | 作用 |