2022-04-12 09:22:09 +08:00
2021-12-03 22:44:03 +08:00
2021-09-30 17:57:29 +08:00
2021-06-08 22:35:08 +08:00
2022-04-07 13:46:58 +08:00
2021-09-11 15:50:17 +08:00
2021-12-02 16:48:06 +08:00
2021-02-06 12:06:40 +08:00
2021-06-08 22:35:08 +08:00
2021-01-17 22:13:44 +08:00
2021-06-08 22:35:08 +08:00
2022-04-12 09:22:09 +08:00
2021-11-29 09:02:43 +00:00
2021-03-27 10:35:31 +08:00
2022-04-04 22:20:42 +08:00
2021-09-13 21:11:36 +08:00
2021-12-24 09:28:29 +08:00
2021-03-01 14:30:33 +08:00
2022-02-25 10:28:13 +08:00
2022-04-07 17:14:18 +08:00
2022-04-06 13:59:17 +08:00

RapidOCR

简体中文 | English

Open in Colab

Contents

Introduction

  • Completely open source, free and support offline deployment of multi-platform and multi-language OCR SDK

  • Chinese Advertising: Welcome to join our QQ group to download the model and test program, QQ group number: 887298230

  • Cause: Baidu paddlepaddle engineering is not very good, in order to facilitate everyone to perform OCR reasoning on various terminals, we convert it to onnx format, use ``python/c++/java/swift/c#'' to change It is ported to various platforms.

  • Name Source: Light, fast, economical and smart. OCR technology based on deep learning technology focuses on artificial intelligence advantages and small models, with speed as the mission and effect as the leading role.

  • 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

🎧2022-04-04 update

  • Add suport for OpenVINO under python
  • Give the performance comparison table of OpenVINO and ONNXRuntime
  • For details:python/README

2022-02-24 update

  • Optimize the inference code of the python part.
  • Add inference code examples that use the different language models.
  • For details, see: python/README

2021-12-18 update

2021-11-28 update

  • Update the ocrweb part
    • Add the display of the inference time of each stage.
    • Add docs of the ocrweb.
    • Change the det model(ch_PP-OCRv2_det_infer.onnx), faster and more accurate.
Previous update logs

2021-11-13 update

  • Add adjustable super parameters for text detection and recognition in Python version, mainly box_thresh|unclip_ratio|text_score, see parameter adjustment for details
  • The dictionary position in text recognition is given in parameter mode to facilitate flexible configuration. See keys_path for details

2021-10-27 update

  • Add the code that uses the onnxruntime GPU version of infering follow the official tutorial Configuration. (however, the onnxruntime GPU version is not stable to use)

  • See: python/README.md for specific steps.

2021-09-13 update

  • Add a whl file based on Python for ease of use. See release/python for details.

2021-09-11 update

  • Add PP-OCRv2 new model onnx version.

  • The infering code of the method is unchanged, and the corresponding model can be directly replaced.

  • After evaluation on its own test set:

    • The effect of PP-OCRv2 detection model has been greatly improved, and the model size has not changed.
    • The effect of PP-OCRv2 recognition model was not significantly improved, and the model size increased by 3.58M.
  • Upload the model to Baidu online disk extraction code: 30jv or Google Drive

2021-08-07 update

  • TODO:

    • PP structure table structure and cell coordinate prediction are being sorted out.
  • Previously done, unfinished, welcome to PR

    • make dokcer image
    • try onnxruntime GPU reasoning

2021-07-17 update

  • Improve the README document
  • Add English, number recognitiononnx model, please refer to python/en_number_ppocr_mobile_v2_rec for details, the usage is the same as others
  • Organize Model to onnx

2021-07-04 update

  • The python program under the repository can be successfully run on the Raspberry Pi 4B. For more information, please enter the QQ group and ask the group owner
  • Update the overall structure diagram and add support for Raspberry Pi

2021-06-20 update

  • Optimize the display of recognition results in ocrweb, and add recognition animations to demonstrate at the same time
  • Update the datasets directory, add some commonly used database links

2021-06-10 update

2021-06-08 update

  • Organize the warehouse and unify the model download path
  • Improve related documentation

2021-03-24 update

  • The new model is fully compatible with ONNXRuntime 1.7 or higher. Special thanks: @Channingss
  • The performance of the new version of onnxruntime is improved by more than 40% compared to 1.6.0.

FAQ

SDK compilation status

Since ubuntu users are all commercial users and have the ability to compile, pre-compiled packages are not provided for the time being, and they can be compiled by themselves.

Platform Compilation Status Offer Status
Windows x86/x64 CMake-windows-x86-x64 Download Link
Linux x64 CMake-linux Not available yet, compile by yourself

Online demo

  • Web demo
  • The model combination used in the demo is: ch_PP-OCRv2 det + mobile cls + mobile rec
  • Environment: 4 Core AMD EPYC 7K62 48-Core Processor
  • Gif Demo:

Directory structure

click to expand
RapidOCR
    ├── android         # Android project directory
    ├── api4cpp         # C language cross-platform interface library source code directory, directly compile with CMakelists.txt under the root
    ├── assets          # Some pictures for demonstration, not a test set
    ├── commonlib       # common library
    ├── cpp             # C++-based project folder
    ├── datasets        # Additional training datasets
    ├── dotnet          # .Net program directory
    ├── FAQ.md          # Some questions and answers
    ├── images          # Test pictures, two typical test pictures, one is a natural scene, the other is a long text
    ├── include         # The header file directory when compiling the c language interface library
    ├── ios             # Apple mobile phone platform project directory
    ├── jvm             # java-based project directory
    ├── lib             # Compilation library file directory, used to compile the C language interface library. Binary files are not uploaded by default
    ├── ocrweb          # Based on python and Flask web
    ├── python          # python reasoning code directory
    ├── release         #
    └── tools           # Some conversion scripts and the like

Current Progress

  • C++ example (Windows/Linux/macOS): demo
  • Jvm example (Java/Kotlin): demo
  • .Net example (C#): demo
  • Android example: demo
  • python example: demo
  • 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

Download models

  • Google Drive link
  • (download link: Baidu extract code: 30jv)
    ch_ppocr_mobile_v2.0_det_infer.onnx
    ch_ppocr_mobile_v2.0_cls_infer.onnx
    ch_ppocr_mobile_v2.0_rec_infer.onnx
    
    ch_ppocr_server_v2.0_det_infer.onnx
    ch_ppocr_server_v2.0_rec_infer.onnx
    
    japan_rec_crnn.onnx
    en_number_mobile_v2.0_rec_infer.onnx
    

Model to onnx

PaddleOCR-FAQ

Original initiator and start-up author

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.

Contact us

  • You can contact us through QQ group: 887298230

  • If you can’t find the group number, please click here link to find the organization

  • Scan the following QR code with QQ:

Demo

Demonstration with C++/JVM

Demonstration with .Net

Demonstratioin with multi_language

S
Description
RapidOCR - lightweight ONNX OCR
Readme Apache-2.0
74 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 81.3%
Jupyter Notebook 18.6%
Makefile 0.1%