提交代码
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
namespace HardwareControl.Core.SampleAnalysis
|
||||
{
|
||||
/// <summary>硬件使用类型,对应系统参数 hardware_usage_type。</summary>
|
||||
public enum HardwareUsageType
|
||||
{
|
||||
/// <summary>仅使用 CPU。</summary>
|
||||
Cpu = 1,
|
||||
|
||||
/// <summary>使用独立显卡(DirectML)。</summary>
|
||||
DiscreteGpu = 2,
|
||||
|
||||
/// <summary>使用核心显卡(DirectML)。</summary>
|
||||
IntegratedGpu = 3,
|
||||
}
|
||||
|
||||
/// <summary>靶样 ONNX 分割模型配置。</summary>
|
||||
public sealed class OnnxSegmentationOptions
|
||||
{
|
||||
@@ -18,11 +31,20 @@ namespace HardwareControl.Core.SampleAnalysis
|
||||
|
||||
public int InputHeight { get; set; } = 640;
|
||||
|
||||
/// <summary>
|
||||
/// 推理执行后端:Auto(优先 DirectML,不可用时回退 CPU)、DirectML、Cpu。
|
||||
/// DirectML 可调用核显/独显,同时保留 CPU 算子回退。
|
||||
/// </summary>
|
||||
public string ExecutionProvider { get; set; } = "Auto";
|
||||
|
||||
/// <summary>DirectML 设备序号,0 表示系统默认适配器。</summary>
|
||||
public int DmlDeviceId { get; set; }
|
||||
|
||||
/// <summary>YOLO 分割模型的目标置信度阈值。</summary>
|
||||
public double ConfidenceThreshold { get; set; } = 0.25;
|
||||
|
||||
/// <summary>
|
||||
/// 模型置信度低于该值时,使用 OpenCV 背景差分兜底识别轮廓。
|
||||
/// 模型置信度低于该值时,继续尝试后续模型,取置信度最高的结果。
|
||||
/// </summary>
|
||||
public double FallbackConfidenceThreshold { get; set; } = 0.6;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user