DetectedObject.cs 689 B

1234567891011121314151617181920212223242526272829
  1. 
  2. namespace YOLODetectProcessLib
  3. {
  4. /// <summary>
  5. /// 模型输出的结果
  6. /// </summary>
  7. public struct DetectedObject : IDetectedObject
  8. {
  9. public int Label { get; set; }
  10. public float Confidence { get; set; }
  11. public Rect BoundingBox { get; set; }
  12. public DetectedObject(int label, float confidence)
  13. {
  14. Label = label;
  15. Confidence = confidence;
  16. BoundingBox = new Rect(0, 0, 0, 0);
  17. }
  18. public DetectedObject(int label, float confidence, Rect boundBox)
  19. {
  20. Label = label;
  21. Confidence = confidence;
  22. BoundingBox = boundBox;
  23. }
  24. }
  25. }