fix bug with annotation result gradient stops

add tensorrt engine
This commit is contained in:
Alex Bezdieniezhnykh
2025-04-02 00:29:21 +03:00
parent e0c88bd8fb
commit b21f8e320f
36 changed files with 544 additions and 206 deletions
+4 -4
View File
@@ -54,7 +54,7 @@ public class CanvasEditor : Canvas
_verticalLine.Fill = value.ColorBrush;
_horizontalLine.Stroke = value.ColorBrush;
_horizontalLine.Fill = value.ColorBrush;
_classNameHint.Text = value.Name;
_classNameHint.Text = value.ShortName;
_newAnnotationRect.Stroke = value.ColorBrush;
_newAnnotationRect.Fill = value.ColorBrush;
@@ -84,7 +84,7 @@ public class CanvasEditor : Canvas
};
_classNameHint = new TextBlock
{
Text = CurrentAnnClass?.Name ?? "asd",
Text = CurrentAnnClass?.ShortName ?? "",
Foreground = new SolidColorBrush(Colors.Black),
Cursor = Cursors.Arrow,
FontSize = 16,
@@ -313,14 +313,14 @@ public class CanvasEditor : Canvas
foreach (var detection in detections)
{
var annClass = DetectionClass.FromYoloId(detection.ClassNumber, detectionClasses);
var canvasLabel = new CanvasLabel(detection, RenderSize, videoSize, detection.Probability);
var canvasLabel = new CanvasLabel(detection, RenderSize, videoSize, detection.Confidence);
CreateDetectionControl(annClass, time, canvasLabel);
}
}
private void CreateDetectionControl(DetectionClass annClass, TimeSpan time, CanvasLabel canvasLabel)
{
var detectionControl = new DetectionControl(annClass, time, AnnotationResizeStart, canvasLabel.Probability)
var detectionControl = new DetectionControl(annClass, time, AnnotationResizeStart, canvasLabel.Confidence)
{
Width = canvasLabel.Width,
Height = canvasLabel.Height