namespace OrpaonVision.SiteApp.Runtime.Contracts; /// /// YOLO推理配置选项。 /// public sealed class YoloInferenceOptions { /// /// 运行模式(Real=真实YOLO推理,Mock=模拟模式)。 /// public string RunMode { get; set; } = "Mock"; // Real | Mock /// /// 模型文件路径。 /// public string ModelPath { get; set; } = string.Empty; /// /// 标签文件路径。 /// public string LabelsPath { get; set; } = string.Empty; /// /// 置信度阈值。 /// public float ConfidenceThreshold { get; set; } = 0.5f; /// /// NMS阈值。 /// public float NmsThreshold { get; set; } = 0.45f; /// /// 输入图像宽度。 /// public int InputWidth { get; set; } = 640; /// /// 输入图像高度。 /// public int InputHeight { get; set; } = 640; /// /// 是否使用GPU。 /// public bool UseGpu { get; set; } = false; /// /// GPU设备ID。 /// public int GpuDeviceId { get; set; } = 0; /// /// 批处理大小。 /// public int BatchSize { get; set; } = 1; /// /// 模型类型(ONNX、TorchScript等)。 /// public string ModelType { get; set; } = "ONNX"; /// /// 是否启用自动预热。 /// public bool EnableWarmup { get; set; } = true; /// /// 预热次数。 /// public int WarmupCount { get; set; } = 3; /// /// YOLO推理引擎类型(YoloDotNet、OpenCV、TensorRT等)。 /// public string InferenceEngine { get; set; } = "YoloDotNet"; /// /// ONNX Runtime执行提供程序(CPU、CUDA等)。 /// public string OnnxRuntimeProvider { get; set; } = "CPU"; /// /// 模型版本信息。 /// public string ModelVersion { get; set; } = "v1.0"; }