版本260406
This commit is contained in:
83
OrpaonVision.Core/LayerRecognition/InferenceResultDto.cs
Normal file
83
OrpaonVision.Core/LayerRecognition/InferenceResultDto.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
namespace OrpaonVision.Core.LayerRecognition;
|
||||
|
||||
/// <summary>
|
||||
/// 推理结果数据传输对象。
|
||||
/// </summary>
|
||||
public sealed class InferenceResultDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 主要标签。
|
||||
/// </summary>
|
||||
public string Label { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 置信度。
|
||||
/// </summary>
|
||||
public double Confidence { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 检测结果列表。
|
||||
/// </summary>
|
||||
public List<DetectionDto> Detections { get; init; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 推理时间(毫秒)。
|
||||
/// </summary>
|
||||
public double InferenceTimeMs { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 模型版本。
|
||||
/// </summary>
|
||||
public string ModelVersion { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 推理时间戳。
|
||||
/// </summary>
|
||||
public DateTime Timestamp { get; init; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>
|
||||
/// 扩展属性。
|
||||
/// </summary>
|
||||
public Dictionary<string, object> ExtendedProperties { get; init; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检测结果数据传输对象。
|
||||
/// </summary>
|
||||
public sealed class DetectionDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 类别。
|
||||
/// </summary>
|
||||
public string Class { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 置信度。
|
||||
/// </summary>
|
||||
public double Confidence { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// X坐标。
|
||||
/// </summary>
|
||||
public double X { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Y坐标。
|
||||
/// </summary>
|
||||
public double Y { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 宽度。
|
||||
/// </summary>
|
||||
public double Width { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 高度。
|
||||
/// </summary>
|
||||
public double Height { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 扩展属性。
|
||||
/// </summary>
|
||||
public Dictionary<string, object> ExtendedProperties { get; init; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user