alanxinn.CvinferSharp
0.1.3
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
dotnet add package alanxinn.CvinferSharp --version 0.1.3
NuGet\Install-Package alanxinn.CvinferSharp -Version 0.1.3
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="alanxinn.CvinferSharp" Version="0.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="alanxinn.CvinferSharp" Version="0.1.3" />
<PackageReference Include="alanxinn.CvinferSharp" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add alanxinn.CvinferSharp --version 0.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: alanxinn.CvinferSharp, 0.1.3"
#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.
#:package alanxinn.CvinferSharp@0.1.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=alanxinn.CvinferSharp&version=0.1.3
#tool nuget:?package=alanxinn.CvinferSharp&version=0.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
alanxinn.CvinferSharp
.NET 封装 alanxinn_cvinfer.dll,支持 net472、net6.0、net8.0。
提供:
- YOLO11/RF-DETR 检测、分割和 Pose;
- BGR 图像推理;
- 检测框、Mask、耗时读取;
- CPU/CUDA backend 配置;
- 非托管资源释放。
安装
dotnet add package alanxinn.CvinferSharp --version 0.1.3
示例
using alanxinn;
var config = new CvinferConfig
{
// 0 或负值:按 engine 输出自动推断类别数
ClassCount = 0,
PreprocessBackend = CvinferComputeBackend.Auto,
PostprocessBackend = CvinferComputeBackend.Auto
};
using var model = new CvinferModel(
"rf-detr-seg.engine",
CvinferModelType.RfDetrSegmentation,
config);
using var result = model.InferBgr(bgrBytes, width, height, 3);
var item = result.GetSegmentation(0);
var mask = result.CopyMask(0);
CvinferConfig.EnableTiming 默认为 false;需要读取 result.Timing 时设为 true。
Pose 使用 CvinferModelType.Yolo11Pose,通过 result.GetPose(index) 读取框和关键点。
支持的模型类型:
CvinferModelType.Yolo11Detection
CvinferModelType.Yolo11Segmentation
CvinferModelType.Yolo11Pose
CvinferModelType.RfDetrDetection
CvinferModelType.RfDetrSegmentation
输入宽高从 engine 自动读取。动态输入使用 profile 0 的 OPT shape。
Native DLL
NuGet native 文件位于:
runtimes/win-x64/native/
至少需要:
alanxinn_cvinfer.dll
nvinfer.dll
cudart64_*.dll
zlibwapi.dll
opencv_world*.dll
CUDA 前后处理还需要可选的 alanxinn_cvinfer_cuda.dll。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- No dependencies.
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
YOLO11/RF-DETR detection, segmentation and pose inference.