arm/yolov5_onnx/Mod/YoloPrediction.cs

27 lines
743 B
C#
Raw Permalink Normal View History

2025-02-04 20:09:10 +08:00
using System.Drawing;
namespace yolov5_onnx.Mod
{
/// <summary>
/// Object prediction.
/// </summary>
public class YoloPrediction
{
public YoloLabel Label { get; set; } //預測目標體標籤
public RectangleF Rectangle { get; set; } //預測的物體邊界框
public float Score { get; set; } //預測物體的信心分數
public YoloPrediction() { } //無參數的構造函數
public YoloPrediction(YoloLabel label, float confidence) : this(label)
{
Score = confidence;
}//帶有標籤和信心度的構造函數
public YoloPrediction(YoloLabel label)
{
Label = label;
} //帶有標籤的構造函數
}
}