-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDetectionObject.cs
37 lines (30 loc) · 945 Bytes
/
DetectionObject.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Inference;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TritonNET
{
internal class DetectionObject
{
public string label;
public float confidence;
//Y_MIN, X_MIN, Y_MAX, X_MAX
float[] box_coordinates = new float[4];
public float y_min { get; set; }
public float x_min { get; set; }
public float y_max { get; set; }
public float x_max { get; set; }
public DetectionObject(string label,float confidence,float[] box_coordinates)
{
this.label = label;
this.confidence = confidence;
this.box_coordinates = box_coordinates;
this.y_min = box_coordinates[0];
this.x_min = box_coordinates[1];
this.y_max = box_coordinates[2];
this.x_max = box_coordinates[3];
}
}
}