DetectionResult<T>
Models & Types · AiDotNet.ComputerVision.Detection.ObjectDetection
Contains the results of object detection on an image.
For Beginners
This class holds all the objects detected in an image. Each detection includes:
- A bounding box showing where the object is
- The class/category of the object (e.g., “person”, “car”)
- A confidence score indicating how sure the model is
Constructors
| Constructor | Summary |
|---|---|
DetectionResult() |
Properties
| Property | Summary |
|---|---|
List<Detection<T>> Detections { get; set; } |
List of all detected objects in the image. |
TimeSpan InferenceTime { get; set; } |
Time taken to run inference. |
int Count { get; } |
Gets the number of detections. |
int ImageHeight { get; set; } |
Original image height in pixels. |
int ImageWidth { get; set; } |
Original image width in pixels. |
string ModelName { get; set; } |
Model name that produced these detections. |
Methods
| Method | Summary |
|---|---|
DetectionResult<T> FilterByClass(int[] classIds) |
Filters detections by class ID. |
DetectionResult<T> FilterByConfidence(double minConfidence) |
Filters detections by confidence threshold. |
DetectionResult<T> SortByConfidence() |
Gets detections sorted by confidence (highest first). |
DetectionResult<T> TopN(int n) |
Gets the top N detections by confidence. |