# PaddleSharp ð [![main](https://github.com/sdcb/PaddleSharp/actions/workflows/main.yml/badge.svg)](https://github.com/sdcb/PaddleSharp/actions/workflows/main.yml) [![QQ](https://img.shields.io/badge/QQ_Group-579060605-52B6EF?style=social&logo=tencent-qq&logoColor=000&logoWidth=20)](https://jq.qq.com/?_wv=1027&k=K4fBqpyQ)
ð .NET Wrapper for `PaddleInference` C API, include [PaddleOCR ð](./docs/ocr.md), [PaddleDetection ð¯](./docs/detection.md), [Rotation Detector ð](./docs/rotation-detection.md), support **Windows**(x64) ð», NVIDIA Cuda 10.2+ based GPU ð® and **Linux**(Ubuntu-22.04 x64) ð§, currently contained following main components:
* [PaddleOCR ð](./docs/ocr.md) support 14 OCR languages model download on-demand, allow rotated text angle detection, 180 degree text detection, also support table recognition ð.
* [PaddleDetection ð¯](./docs/detection.md) support PPYolo detection model and PicoDet model ð¹.
* [RotationDetection ð](./docs/rotation-detection.md) use Baidu's official `text_image_orientation_infer` model to detect text picture's rotation angle(`0, 90, 180, 270`).
## NuGet Packages/Docker Images ð¦
### Release notes ð
Please checkout [this page ð](https://github.com/sdcb/PaddleSharp/releases).
### Infrastructure packages ðï¸
| NuGet Package ð¼ | Version ð | Description ð |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| Sdcb.PaddleInference | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleInference.svg)](https://nuget.org/packages/Sdcb.PaddleInference) | Paddle Inference C API .NET binding âï¸ |
| Sdcb.PaddleInference.runtime.win64.mkl | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleInference.runtime.win64.mkl.svg)](https://nuget.org/packages/Sdcb.PaddleInference.runtime.win64.mkl) | Paddle Inference native windows-x64-mkldnn binding ð |
| Sdcb.PaddleInference.runtime.win64.openblas | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleInference.runtime.win64.openblas.svg)](https://nuget.org/packages/Sdcb.PaddleInference.runtime.win64.openblas) | Paddle Inference native windows-x64-openblas binding ð |
**Note**: Linux does not need a native binding `NuGet` package like windows(`Sdcb.PaddleInference.runtime.win64.mkl`), instead, you can/should based from a [Dockerfile ð³](https://hub.docker.com/r/sdflysha/dotnet6-focal-paddle2.2.2) to development:
| Docker Images ð³ | Version ð | Description ð |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| sdflysha/dotnet6-paddle | [![Docker](https://img.shields.io/docker/v/sdflysha/dotnet6-paddle)](https://hub.docker.com/r/sdflysha/dotnet6-paddle) | PaddleInference 2.4.2, OpenCV 4.7.0, based on official Ubuntu 22.04 .NET 6 Runtime ð |
| sdflysha/dotnet6sdk-paddle | [![Docker](https://img.shields.io/docker/v/sdflysha/dotnet6sdk-paddle)](https://hub.docker.com/r/sdflysha/dotnet6sdk-paddle) | PaddleInference 2.4.2, OpenCV 4.7.0, based on official Ubuntu 22.04 .NET 6 SDK ð |
### Paddle Inference GPU package ð®
Since GPU package are too large(>1.5GB), I cannot publish a NuGet package to nuget.org, there is a limitation of 250MB when upload to Github, there is some related issues to this:
* https://github.com/PaddlePaddle/Paddle/issues/43874 â
* https://github.com/NuGet/Home/issues/11706#issuecomment-1167305006 â
However, you're good to build your own GPU nuget package using `01-build-native.linq` ð ï¸.
Here is the GPU package that I compiled (not from Baidu official) ð ï¸:
| NuGet Package ð¼ | Version ð | Description ð |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| cuda117_cudnn84_tr84_sm86 | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleInference.runtime.win64.cuda117_cudnn84_tr84_sm86.svg)](https://nuget.org/packages/Sdcb.PaddleInference.runtime.win64.cuda117_cudnn84_tr84_sm86) | win64/CUDA 11.7/cuDNN 8.4/TensorRT 8.4/sm86 binding ð |
| cuda102_cudnn76_sm61_75 | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleInference.runtime.win64.cuda102_cudnn76_sm61_75.svg)](https://nuget.org/packages/Sdcb.PaddleInference.runtime.win64.cuda102_cudnn76_sm61_75) | win64/CUDA 10.2/cuDNN 7.6/sm61+sm75 binding ð |
| cuda116_cudnn84_sm86_onnx | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleInference.runtime.win64.cuda116_cudnn84_sm86_onnx.svg)](https://nuget.org/packages/Sdcb.PaddleInference.runtime.win64.cuda116_cudnn84_sm86_onnx) | win64/CUDA 11.6/cuDNN 8.4/sm86/onnx binding ð |
### PaddleOCR packages ð
| NuGet Package ð¼ | Version ð | Description ð |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| Sdcb.PaddleOCR | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleOCR.svg)](https://nuget.org/packages/Sdcb.PaddleOCR) | PaddleOCR library(based on Sdcb.PaddleInference) âï¸ |
| Sdcb.PaddleOCR.Models.Online | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleOCR.Models.Online.svg)](https://nuget.org/packages/Sdcb.PaddleOCR.Models.Online) | Online PaddleOCR models, will download when first using ð |
| Sdcb.PaddleOCR.Models.LocalV3 | [![NuGet](https://img.shields.io/nuget/v/Sdcb.PaddleOCR.Models.LocalV3.svg)](https://nuget.org/packages/Sdcb.PaddleOCR.Models.LocalV3) | Full local v3 models, include multiple language(~130MB) ðºï¸ |
### Rotation Detection packages (part of PaddleCls) ð
| NuGet Package ð¼ | Version ð | Description ð |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| Sdcb.RotationDetector | [![NuGet](https://img.shields.io/nuget/v/Sdcb.RotationDetector.svg)](https://nuget.org/packages/Sdcb.RotationDetector) | RotationDetector library(based on Sdcb.PaddleInference) âï¸ |
### PaddleDetection packages ð¯
| NuGet Package ð¼ | Version ð