mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:56:30 +00:00
move detection classes and other system values from local config to remote
forbid non validators to read from queue create better visualization in detector control make colors for detection classes more distinguishable fix bug with removing detection (probably completely)
This commit is contained in:
@@ -169,7 +169,8 @@ public class CanvasEditor : Canvas
|
||||
Width = width,
|
||||
Height = height,
|
||||
X = Math.Min(endPos.X, _newAnnotationStartPos.X),
|
||||
Y = Math.Min(endPos.Y, _newAnnotationStartPos.Y)
|
||||
Y = Math.Min(endPos.Y, _newAnnotationStartPos.Y),
|
||||
Confidence = 1
|
||||
});
|
||||
}
|
||||
|
||||
@@ -312,25 +313,21 @@ public class CanvasEditor : Canvas
|
||||
{
|
||||
foreach (var detection in detections)
|
||||
{
|
||||
var annClass = DetectionClass.FromYoloId(detection.ClassNumber, detectionClasses);
|
||||
var detectionClass = DetectionClass.FromYoloId(detection.ClassNumber, detectionClasses);
|
||||
var canvasLabel = new CanvasLabel(detection, RenderSize, videoSize, detection.Confidence);
|
||||
CreateDetectionControl(annClass, time, canvasLabel);
|
||||
CreateDetectionControl(detectionClass, time, canvasLabel);
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateDetectionControl(DetectionClass annClass, TimeSpan time, CanvasLabel canvasLabel)
|
||||
private void CreateDetectionControl(DetectionClass detectionClass, TimeSpan time, CanvasLabel canvasLabel)
|
||||
{
|
||||
var detectionControl = new DetectionControl(annClass, time, AnnotationResizeStart, canvasLabel.Confidence)
|
||||
{
|
||||
Width = canvasLabel.Width,
|
||||
Height = canvasLabel.Height
|
||||
};
|
||||
var detectionControl = new DetectionControl(detectionClass, time, AnnotationResizeStart, canvasLabel);
|
||||
detectionControl.MouseDown += AnnotationPositionStart;
|
||||
SetLeft(detectionControl, canvasLabel.X );
|
||||
SetTop(detectionControl, canvasLabel.Y);
|
||||
Children.Add(detectionControl);
|
||||
CurrentDetections.Add(detectionControl);
|
||||
_newAnnotationRect.Fill = new SolidColorBrush(annClass.Color);
|
||||
_newAnnotationRect.Fill = new SolidColorBrush(detectionClass.Color);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user