mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:56:30 +00:00
fix bug with annotation result gradient stops
add tensorrt engine
This commit is contained in:
@@ -26,22 +26,22 @@ public class CanvasLabel : Label
|
||||
public double Y { get; set; }
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
public double? Probability { get; }
|
||||
public double? Confidence { get; }
|
||||
|
||||
public CanvasLabel()
|
||||
{
|
||||
}
|
||||
|
||||
public CanvasLabel(int classNumber, double x, double y, double width, double height, double? probability = null) : base(classNumber)
|
||||
public CanvasLabel(int classNumber, double x, double y, double width, double height, double? confidence = null) : base(classNumber)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Width = width;
|
||||
Height = height;
|
||||
Probability = probability;
|
||||
Confidence = confidence;
|
||||
}
|
||||
|
||||
public CanvasLabel(YoloLabel label, Size canvasSize, Size? videoSize = null, double? probability = null)
|
||||
public CanvasLabel(YoloLabel label, Size canvasSize, Size? videoSize = null, double confidence = 1)
|
||||
{
|
||||
var cw = canvasSize.Width;
|
||||
var ch = canvasSize.Height;
|
||||
@@ -75,7 +75,7 @@ public class CanvasLabel : Label
|
||||
Width = label.Width * realWidth;
|
||||
Height = label.Height * ch;
|
||||
}
|
||||
Probability = probability;
|
||||
Confidence = confidence;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,12 +189,12 @@ public class YoloLabel : Label
|
||||
public class Detection : YoloLabel
|
||||
{
|
||||
[JsonProperty(PropertyName = "an")][Key("an")] public string AnnotationName { get; set; } = null!;
|
||||
[JsonProperty(PropertyName = "p")][Key("p")] public double? Probability { get; set; }
|
||||
[JsonProperty(PropertyName = "p")][Key("p")] public double Confidence { get; set; }
|
||||
|
||||
//For db & serialization
|
||||
public Detection(){}
|
||||
|
||||
public Detection(string annotationName, YoloLabel label, double? probability = null)
|
||||
public Detection(string annotationName, YoloLabel label, double confidence = 1)
|
||||
{
|
||||
AnnotationName = annotationName;
|
||||
ClassNumber = label.ClassNumber;
|
||||
@@ -202,6 +202,6 @@ public class Detection : YoloLabel
|
||||
CenterY = label.CenterY;
|
||||
Height = label.Height;
|
||||
Width = label.Width;
|
||||
Probability = probability;
|
||||
Confidence = confidence;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user