Jdt.ML.QRDetector
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Jdt.ML.QRDetector --version 1.0.4
NuGet\Install-Package Jdt.ML.QRDetector -Version 1.0.4
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="Jdt.ML.QRDetector" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jdt.ML.QRDetector --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Jdt.ML.QRDetector, 1.0.4"
#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 Jdt.ML.QRDetector as a Cake Addin #addin nuget:?package=Jdt.ML.QRDetector&version=1.0.4 // Install Jdt.ML.QRDetector as a Cake Tool #tool nuget:?package=Jdt.ML.QRDetector&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Jdt.ML.QRDetector
Yolov8-based Barcode(QR & 2D Data Matrix) Detection and Decoding Library
๐ฉ How to use a library?
- Nuget์์ 'Jdt.ML.QRDetector' ๊ฒ์ํ์ฌ ์ค์น๊ฐ ๊ฐ๋ฅํฉ๋๋ค.
- ๊ธฐ๋ณธ์ ์ผ๋ก, package์์ ๋ฏธ๋ฆฌ ์์ฑ๋ QR Detect ๋ชจ๋ธ์ด ์๋ฒ ๋ฉ๋์ด ์์ต๋๋ค.
๋ค๋ง ์๋์ผ๋ก ์๋ก์ด ๋ชจ๋ธ์ ๋ถ๋ฌ์ค๊ณ ์ถ์ผ์ ๊ฒฝ์ฐ ์๋์ ๊ฐ์ด ์ฌ์ฉ ํ์๋ฉด ๋ฉ๋๋ค.
Inference detector = new Infrence("D:\MyCustomModel.onnx", useGPU: false);
1. QR Barcode ๊ฒ์ถ ๋ฐ Decode ๋ฐฉ๋ฒ (๊ฒ์ถ ๋์ฝ๋ฉ์ ๊ฐ์ด ์งํํ๊ณ ์ถ์๋)
// ๋ฏธ๋ฆฌ ai model ๋ถ๋ฌ์์ ์ถ๋ก ์งํ ๋๊ธฐํจ
Inference detector = new Inference(useGPU: false); // ์ถ๋ก ์ GPU๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด, CUDA๋ฅผ ์ค์นํด์ผ ์ฌ์ฉ ๊ฐ๋ฅํฉ๋๋ค.
string imagePath = @"D:\Sample01.jpg";
string decode = detector.DetectAndDecode(imagePath);
Console.WriteLine(decode);
2. QR Detect ๋ฐฉ๋ฒ (๋์ฝ๋ฉ ์์ด ๋ฐ์ฝ๋ ๊ฒ์ถ๋ง์ด ๋ชฉ์ ์ผ๋)
Inference detector = new Inference(useGPU: false); // ์ถ๋ก ์ GPU๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด, CUDA๋ฅผ ์ค์นํด์ผ ์ฌ์ฉ ๊ฐ๋ฅํฉ๋๋ค.
string imagePath = @"D:\Sample01.jpg";
var result = detector.Detect(imagePath);
if (result.IsFound)
{
// ๊ฒ์ถํ Barcode ๊ฐฏ์ ์ถ๋ ฅ
Console.WriteLine($"Detected: {result.Prediction.Length}");
foreach (var pred in result.Prediction)
{
// ๊ฒ์ถํ ์์ญ์ x,y,width,height ๊ฐ
var bbox = pred.Rectangle;
// AI๊ฐ ๊ฒ์ถํ ์์ญ์ Score
Console.WriteLine($"Inference Score: {Math.Round(pred.Score, 2)}");
}
}
3. ๊ฒ์ถํ QR Detect ์์ญ Bounding Box๋ฅผ ํ์ธํ๋ ๋ฉ์๋
Inference detector = new Inference(useGPU: false);
string imagePath = @"D:\Sample01.jpg";
var drawBox = detector.Show(imagePath);
if (drawBox == null)
return;
picturebox1.Image = drawBox;
โ๏ธ Do You need Image Preprocessing?
- Detect๋ฅผ ์งํ ํ๊ธฐ ์ ์ด๋ฏธ์ง ์ ์ฒ๋ฆฌ๋ฅผ ์งํํ ์ ์์ต๋๋ค.
PreprocessImage์ ์ํ๋ ์ ์ฒ๋ฆฌ๋ฅผ ์์ฑ ํ Bitmap ๊ฐ์ฒด๋ฅผ ๋ฐํํ๋ฉด ํด๋น ๊ฐ์ฒด๋ก ์ถ๋ก ์ ์งํ ํฉ๋๋ค.
Inference detector = new Inference(false);
string imagePath = @"D:\Sample01.jpg";
_detector.PreprocessImage = (image) =>
{
/* The provided 'image' is the image object before inference.
After applying the image preprocessing you desire, return a bitmap object,
and the AI inference will be performed using that bitmap object. */
return new Bitmap(image, new Size(512, 512));
};
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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.
-
.NETStandard 2.0
- Microsoft.ML.OnnxRuntime (>= 1.15.1)
- Microsoft.ML.OnnxRuntime.Managed (>= 1.15.1)
- OpenCvSharp4.Extensions (>= 4.8.0.20230708)
- OpenCvSharp4.Windows (>= 4.8.0.20230708)
- ZXing.Net (>= 0.16.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.