namespace OrpaonVision.Core.LayerRecognition; /// /// 推理结果数据传输对象。 /// public sealed class InferenceResultDto { /// /// 主要标签。 /// public string Label { get; init; } = string.Empty; /// /// 置信度。 /// public double Confidence { get; init; } /// /// 检测结果列表。 /// public List Detections { get; init; } = new(); /// /// 推理时间(毫秒)。 /// public double InferenceTimeMs { get; init; } /// /// 模型版本。 /// public string ModelVersion { get; init; } = string.Empty; /// /// 推理时间戳。 /// public DateTime Timestamp { get; init; } = DateTime.UtcNow; /// /// 扩展属性。 /// public Dictionary ExtendedProperties { get; init; } = new(); } /// /// 检测结果数据传输对象。 /// public sealed class DetectionDto { /// /// 类别。 /// public string Class { get; init; } = string.Empty; /// /// 置信度。 /// public double Confidence { get; init; } /// /// X坐标。 /// public double X { get; init; } /// /// Y坐标。 /// public double Y { get; init; } /// /// 宽度。 /// public double Width { get; init; } /// /// 高度。 /// public double Height { get; init; } /// /// 扩展属性。 /// public Dictionary ExtendedProperties { get; init; } = new(); }