mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:26:31 +00:00
fix bug with annotation result gradient stops
add tensorrt engine
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Azaion.Common.DTO;
|
||||
using Azaion.Common.DTO.Queue;
|
||||
@@ -22,7 +23,9 @@ public class DatasetExplorerEventHandler(
|
||||
{ Key.Delete, PlaybackControlEnum.RemoveSelectedAnns },
|
||||
{ Key.X, PlaybackControlEnum.RemoveAllAnns },
|
||||
{ Key.Escape, PlaybackControlEnum.Close },
|
||||
{ Key.V, PlaybackControlEnum.ValidateAnnotations}
|
||||
{ Key.Down, PlaybackControlEnum.Next },
|
||||
{ Key.Up, PlaybackControlEnum.Previous },
|
||||
{ Key.V, PlaybackControlEnum.ValidateAnnotations},
|
||||
};
|
||||
|
||||
public async Task Handle(DatasetExplorerControlEvent notification, CancellationToken cancellationToken)
|
||||
@@ -63,15 +66,28 @@ public class DatasetExplorerEventHandler(
|
||||
var detections = datasetExplorer.ExplorerEditor.CurrentDetections
|
||||
.Select(x => new Detection(a.Name, x.GetLabel(datasetExplorer.ExplorerEditor.RenderSize)))
|
||||
.ToList();
|
||||
var index = datasetExplorer.ThumbnailsView.SelectedIndex;
|
||||
await annotationService.SaveAnnotation(a.OriginalMediaName, a.Time, detections, SourceEnum.Manual, token: cancellationToken);
|
||||
datasetExplorer.SwitchTab(toEditor: false);
|
||||
await datasetExplorer.EditAnnotation(index + 1);
|
||||
break;
|
||||
case PlaybackControlEnum.RemoveSelectedAnns:
|
||||
datasetExplorer.ExplorerEditor.RemoveSelectedAnns();
|
||||
if (datasetExplorer.ExplorerEditor.CurrentDetections.Any(x => x.IsSelected))
|
||||
datasetExplorer.ExplorerEditor.RemoveSelectedAnns();
|
||||
else
|
||||
{
|
||||
await datasetExplorer.DeleteAnnotations();
|
||||
await datasetExplorer.EditAnnotation(datasetExplorer.ThumbnailsView.SelectedIndex);
|
||||
}
|
||||
break;
|
||||
case PlaybackControlEnum.RemoveAllAnns:
|
||||
datasetExplorer.ExplorerEditor.RemoveAllAnns();
|
||||
break;
|
||||
case PlaybackControlEnum.Next:
|
||||
await datasetExplorer.EditAnnotation(datasetExplorer.ThumbnailsView.SelectedIndex + 1);
|
||||
break;
|
||||
case PlaybackControlEnum.Previous:
|
||||
await datasetExplorer.EditAnnotation(datasetExplorer.ThumbnailsView.SelectedIndex - 1);
|
||||
break;
|
||||
case PlaybackControlEnum.Close:
|
||||
datasetExplorer.SwitchTab(toEditor: false);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user