📄 Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.
Update README
SWHL7ee2ac834c41
diff --git a/README.md b/README.mdindex 6b6859b..3b74eb9 100755--- a/README.md+++ b/README.md@@ -27,9 +27,9 @@- [RapidOCR (捷智OCR)](#rapidocr-捷智ocr)- [简介](#简介)- [近期更新(more)](#近期更新more)+ - [🧻2022-11-20 upadte:](#2022-11-20-upadte)- [🎃2022-11-01 update:](#2022-11-01-update)- [🚩2022-10-01 udpate:](#2022-10-01-udpate)- - [🛴2022-09-01 update:](#2022-09-01-update)- [垂直相关项目(more)](#垂直相关项目more)- [衍生项目](#衍生项目)- [生态框架](#生态框架)@@ -63,6 +63,9 @@- 基于百度的开源PaddleOCR 模型及训练,任何人可以使用本推理库,也可以根据自己的需求使用百度的paddlepaddle框架进行模型优化。## 近期更新([more](./docs/change_log.md))+#### 🧻2022-11-20 upadte:+- \[python\] 添加版面分析部分,支持中文、英文和表格三种版面的检测分析。详情参见:[Rapid Structure](./python/rapid_structure/README.md)部分。+#### 🎃2022-11-01 update:- 添加Hugging Face Demo, 增加可以调节超参数的功能,详情可访问[Hugging Face Demo](https://huggingface.co/spaces/SWHL/RapidOCRDemo)@@ -71,10 +74,6 @@- merge来自[AutumnSun1996](https://github.com/AutumnSun1996)的[OCRWeb实现的多语言部署](https://github.com/RapidAI/RapidOCR/pull/46)demo,详情参见:[ocrweb_mutli-README](./ocrweb_multi/README.md)- 添加onnxruntime-gpu推理速度较慢于CPU的问题说明,详情参见:[onnxruntime-gpu版相关说明](./python/README.md#onnxruntime-gpu版相关说明)-#### 🛴2022-09-01 update:-- 由于openvino发布了2022.2.0.dev20220829版本,该版本解决了`cls`部分模型推理的问题。至此,基于openvino的rapidocr完成了统一,全部由openvino推理引擎完成。-- 详细使用方法参见:[python/README](./python/README.md#源码使用步骤)-## 垂直相关项目([more](./docs/related_projects.md))- [RapidVideOCR](https://github.com/SWHL/RapidVideOCR):基于RapidOCR,提取视频中的硬字幕diff --git a/docs/README_en.md b/docs/README_en.mdindex 6983b6a..09ab782 100644--- a/docs/README_en.md+++ b/docs/README_en.md@@ -26,9 +26,9 @@- [RapidOCR](#rapidocr)- [Introduction](#introduction)- [Recently updates(more)](#recently-updatesmore)+ - [🧻2022-11-20 upadte:](#2022-11-20-upadte)- [🎃2022-11-01 update:](#2022-11-01-update)- [🚩2022-10-01 udpate:](#2022-10-01-udpate)- - [🛴2022-09-01 update:](#2022-09-01-update)- [Related projects (more)](#related-projects-more)- [Derivatives](#derivatives)- [Overall Framework](#overall-framework)@@ -65,6 +65,9 @@- Based on Baidu's open source PaddleOCR model and training, anyone can use this inference library, or use Baidu's paddlepaddle framework for model optimization according to their own needs.## Recently updates([more](./change_log_en.md))+#### 🧻2022-11-20 upadte:+- \[python\] Add the layout analysis part, which supports the detection and analysis of three layouts: Chinese, English and tables. See: [Rapid Structure](../python/rapid_structure/README.md) section for details.+#### 🎃2022-11-01 update:- Add Hugging Face Demo, add module that can adjust hyperameters, for details, please visit [Hugging Face Demo](https://huggingface.co/spaces/SWHL/RapidOCRDemo).@@ -73,10 +76,6 @@- Merge the [OCRWeb Implementation of Multilingual Deployment](https://github.com/RapidAI/RapidOCR/pull/46) demo from [AutumnSun1996](https://github.com/AutumnSun1996), see for details: [ocrweb_mutli-README](./ocrweb_multi/README.md)- Add a description of the problem that onnxruntime-gpu inference speed is slower than CPU. For details, please refer to: [onnxruntime-gpu version related instructions](../python/README.md#onnxruntime-gpu版相关说明)-#### 🛴2022-09-01 update:-- Since openvino released version 2022.2.0.dev20220829, this version solves the problem of `cls` partial model inference. So far, the openvino-based rapidocr has been unified, and it is all completed by the openvino inference engine.-- For detailed usage, see: [python/README](../python/README.md#源码使用步骤).-## Related projects ([more](../docs/related_projects.md))- [RapidVideOCR](https://github.com/SWHL/RapidVideOCR): Extract hard subtitles in videos based on RapidOCRdiff --git a/docs/change_log.md b/docs/change_log.mdindex 0fe3381..baeff44 100644--- a/docs/change_log.md+++ b/docs/change_log.md@@ -1,3 +1,6 @@+#### 🧻2022-11-20 upadte:+- \[python\] 添加版面分析部分,支持中文、英文和表格三种版面的检测分析。详情参见:[Rapid Structure](./python/rapid_structure/README.md)部分。+#### 🎃2022-11-01 update:- 添加Hugging Face Demo, 增加可以调节超参数的功能,详情可访问[Hugging Face Demo](https://huggingface.co/spaces/SWHL/RapidOCRDemo)diff --git a/docs/change_log_en.md b/docs/change_log_en.mdindex d60f997..925e1df 100644--- a/docs/change_log_en.md+++ b/docs/change_log_en.md@@ -1,3 +1,6 @@+#### 🧻2022-11-20 upadte:+- \[python\] Add the layout analysis part, which supports the detection and analysis of three layouts: Chinese, English and tables. See: [Rapid Structure](../python/rapid_structure/README.md) section for details.+#### 🎃2022-11-01 update:- Add Hugging Face Demo, add module that can adjust hyperameters, for details, please visit [Hugging Face Demo](https://huggingface.co/spaces/SWHL/RapidOCRDemo).diff --git a/python/rapid_structure/rapid_layout/utils.py b/python/rapid_structure/rapid_layout/utils.pyindex 15be16d..200a274 100644--- a/python/rapid_structure/rapid_layout/utils.py+++ b/python/rapid_structure/rapid_layout/utils.py@@ -132,15 +132,11 @@ class NormalizeImage(object):class ToCHWImage(object):""" convert hwc image to chw image"""-def __init__(self, **kwargs):passdef __call__(self, data):- img = data['image']- from PIL import Image- if isinstance(img, Image.Image):- img = np.array(img)+ img = np.array(data['image'])data['image'] = img.transpose((2, 0, 1))return data