Giter VIP home page Giter VIP logo

paddleocr-openvino-csharp's Introduction

OpenVINO™ C# API

简体中文 | English

Deploying PaddleOCR using OpenVINOTM C # API

This project is mainly based on the development of the OpenVINOTMC # API project, using the C # programming language NET framework, use OpenVINOTM deployment tool to deploy PaddleOCR series models under Baidu PaddlePaddle, and realize image text recognition, layout analysis, table recognition and other functions. The project provides simple cases and API interfaces for secondary development, which can be developed and used according to your own needs.

🛠 Project Environment

In this project, we mainly use our self-developed **OpenVINOTM C # API ** project and **OpenCvSharp4 **project. The **NuGet Package ** package and installation method used are as follows:

NuGet Package

  • OpenVINO.CSharp.API >= 2023.2.0.2

  • OpenVINO.runtime.win >= 2023.2.0.1

  • OpenCvSharp4.Windows >= 4.8.0.20230708

  • OpenCvSharp4.Extensions >= 4.8.0.20230708

😇 Installation

NuGet Package can be installed through Visual Studio or through the **dotnet ** command. The installation method is as follows:

dotnet add package OpenVINO.CSharp.API
dotnet add package OpenVINO.runtime.win
dotnet add package OpenCvSharp4.Windows
dotnet add package OpenCvSharp4.Extensions

🎯Quick Start

Clone Source Code

git clone https://github.com/guojin-yan/PaddleOCR-OpenVINO-CSharp.git
cd PaddleOCR-OpenVINO-CSharp

Obtain Prediction Model

The models used in the project are all from PaddleOCR The model directory can be referenced

Attention:

 After testing, OpenVINO currently supports all models in the PP-OCR Model List and PP Structure Model List, as well as models in PaddlePaddle format. Users can use them directly after downloading, but the table recognition model ppstructure_ Mobile_ V2.0_ SLANet needs to be converted before it can be used, and the input shape of the fixed mold line needs to be [1, 3, 488, 488]. The conversion method keyi refers to the article: Paddle2ONNX

For the convenience of quick use, here is a quick download method for the model:

cd model
./ocr_model_download.sh
./stru_model_download.sh

The directory structure of the downloaded model file is:

model
   ├──── paddle
            ├──── ch_ppocr_mobile_v2.0_cls_infer
            ├──── ch_PP-OCRv4_det_infer
            ├──── ch_PP-OCRv4_rec_infer
            ├──── ch_ppstructure_mobile_v2.0_SLANet_infer
            ├──── en_ppstructure_mobile_v2.0_SLANet_infer
            ├──── picodet_lcnet_x1_0_fgd_layout_cdla_infer

OCR Rec

You can run the project directly through **Visual Studio ** or through the **dotnet run ** command. The **dotnet run ** command is as follows:

cd PaddleOCR-OpenVINO-CSharp/sample
dotnet run ./../../

The output after running the program is shown in the following figure:

📱 Contact

If you are planning to deploy the PaddleOCR model using OpenVINO, please refer to this case. If you have any questions during use, you can contact me through the following methods.

paddleocr-openvino-csharp's People

Contributors

guojin-yan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.