Sdcb.PaddleDetection 2.3.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Sdcb.PaddleDetection --version 2.3.1                
NuGet\Install-Package Sdcb.PaddleDetection -Version 2.3.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sdcb.PaddleDetection" Version="2.3.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sdcb.PaddleDetection --version 2.3.1                
#r "nuget: Sdcb.PaddleDetection, 2.3.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Sdcb.PaddleDetection as a Cake Addin
#addin nuget:?package=Sdcb.PaddleDetection&version=2.3.1

// Install Sdcb.PaddleDetection as a Cake Tool
#tool nuget:?package=Sdcb.PaddleDetection&version=2.3.1                

Usage

  1. Get your PaddleDetection models ready, or just download a model from my exported models (which is exported from official PaddlePaddle PicoDet and PPYolo).

  2. Check your models

    Note: PaddleDetection inference model must should like following format:

    model_dir
    -> infer_cfg.yml
    -> model.pdiparams
    -> model.pdiparams.info
    -> model.pdmodel
    

    If your model filename is xxx.pdparams, you must export to inference model, you can refer to this document to export a inference model.

  3. Install NuGet Packages:

    Sdcb.PaddleInference
    Sdcb.PaddleInference.runtime.win64.mkl
    Sdcb.PaddleDetection
    OpenCvSharp4
    OpenCvSharp4.runtime.win
    
  4. Using following C# code to get result:

    string modelDir = DetectionLocalModel.PicoDets.L_416_coco.Directory; // your model directory here
    using (PaddleDetector detector = new PaddleDetector(modelDir, Path.Combine(modelDir, "infer_cfg.yml"), PaddleDevice.Mkldnn()))
    using (VideoCapture vc = new VideoCapture())
    {
        vc.Open(0);
        while (true)
        {
            using (Mat mat = vc.RetrieveMat())
            {
                DetectionResult[] results = detector.Run(mat);
    
                using (Mat dest = PaddleDetector.Visualize(mat, 
                    results.Where(x => x.Confidence > 0.5f), 
                    detector.Config.LabelList.Length))
                {
                    Cv2.ImShow("test", dest);
                }
            }
            Cv2.WaitKey(1);
        }
    }
    

running effect(for image): image

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Sdcb.PaddleDetection:

Package Downloads
HHO.LV.OCR

Library packed for OCR

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.3.1 301 6/5/2024
2.3.3 758 8/4/2023
2.3.1 310 6/17/2023
2.3.0 465 2/6/2023
2.3.0-preview.2 110 2/6/2023
2.2.2 923 2/18/2022