![]() |
VOOZH | about |
dotnet add package LTW.YoloDotNet.DirectML.Execution.Provider --version 1.0.1-aotfix.1
NuGet\Install-Package LTW.YoloDotNet.DirectML.Execution.Provider -Version 1.0.1-aotfix.1
<PackageReference Include="LTW.YoloDotNet.DirectML.Execution.Provider" Version="1.0.1-aotfix.1" />
<PackageVersion Include="LTW.YoloDotNet.DirectML.Execution.Provider" Version="1.0.1-aotfix.1" />Directory.Packages.props
<PackageReference Include="LTW.YoloDotNet.DirectML.Execution.Provider" />Project file
paket add LTW.YoloDotNet.DirectML.Execution.Provider --version 1.0.1-aotfix.1
#r "nuget: LTW.YoloDotNet.DirectML.Execution.Provider, 1.0.1-aotfix.1"
#:package LTW.YoloDotNet.DirectML.Execution.Provider@1.0.1-aotfix.1
#addin nuget:?package=LTW.YoloDotNet.DirectML.Execution.Provider&version=1.0.1-aotfix.1&prereleaseInstall as a Cake Addin
#tool nuget:?package=LTW.YoloDotNet.DirectML.Execution.Provider&version=1.0.1-aotfix.1&prereleaseInstall as a Cake Tool
YoloDotNet 使用模块化执行器在不同硬件后端上运行推理。 每个执行器都针对特定平台或加速器,并且可能需要额外的系统级依赖, 例如运行时、驱动程序或操作系统支持。
仅安装 NuGet 包并不总是足够——正确配置取决于所选执行器与目标系统。
本文档介绍 DirectML 执行器 的安装与使用。
所有执行器都依赖核心 YoloDotNet 包。
dotnet add package YoloDotNet
DirectML 执行器通过 ONNX Runtime 使用 Microsoft DirectML, 在 Windows 上启用 GPU 加速推理。
DirectML 基于 DirectX 12 提供与硬件厂商无关的 GPU 后端, 可在多种 GPU 上运行推理,而无需厂商专属 SDK。
该执行器尤其适合:
⚠️ 注意
此执行器依赖 Windows 通过 DirectX 12 提供的 DirectML 支持。
除受支持的 Windows 版本和 GPU 驱动外,无需额外 SDK。
dotnet add package YoloDotNet.ExecutionProvider.DirectML
YoloDotNet.ExecutionProvider.DirectML v1.0 需要 YoloDotNet 4.1 版本。
无需单独安装 DirectML 或 DirectX SDK。DirectML 已包含在 Windows 与 ONNX Runtime 中。
using YoloDotNet;
using YoloDotNet.ExecutionProvider.DirectML;
using var yolo = new Yolo(new YoloOptions
{
ExecutionProvider = new DirectMLExecutionProvider(
model: "path/to/model.onnx",
gpuId: 0
),
// ...其他选项
});
DirectML 相比厂商专属优化,更强调 广泛兼容性与部署简便性。
如果推理初始化失败:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1-aotfix.1 | 45 | 5/6/2026 |