mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:56:31 +00:00
fix bug with annotation result gradient stops
add tensorrt engine
This commit is contained in:
@@ -77,11 +77,11 @@ public partial class DatasetExplorer
|
||||
await DeleteAnnotations();
|
||||
break;
|
||||
case Key.Enter:
|
||||
await EditAnnotation();
|
||||
await EditAnnotation(ThumbnailsView.SelectedIndex);
|
||||
break;
|
||||
}
|
||||
};
|
||||
ThumbnailsView.MouseDoubleClick += async (_, _) => await EditAnnotation();
|
||||
ThumbnailsView.MouseDoubleClick += async (_, _) => await EditAnnotation(ThumbnailsView.SelectedIndex);
|
||||
|
||||
ThumbnailsView.SelectionChanged += (_, _) =>
|
||||
{
|
||||
@@ -152,7 +152,7 @@ public partial class DatasetExplorer
|
||||
.Select(gr => new
|
||||
{
|
||||
gr.Key,
|
||||
_annotationConfig.DetectionClassesDict[gr.Key].Name,
|
||||
_annotationConfig.DetectionClassesDict[gr.Key].ShortName,
|
||||
_annotationConfig.DetectionClassesDict[gr.Key].Color,
|
||||
ClassCount = gr.Value.Count
|
||||
})
|
||||
@@ -175,7 +175,7 @@ public partial class DatasetExplorer
|
||||
|
||||
foreach (var x in data)
|
||||
{
|
||||
var label = ClassDistribution.Plot.Add.Text(x.Name, 50, -1.5 * x.Key + 1.1);
|
||||
var label = ClassDistribution.Plot.Add.Text(x.ShortName, 50, -1.5 * x.Key + 1.1);
|
||||
label.LabelFontColor = foregroundColor;
|
||||
label.LabelFontSize = 18;
|
||||
}
|
||||
@@ -204,16 +204,17 @@ public partial class DatasetExplorer
|
||||
RefreshThumbnailsButtonItem.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private async Task EditAnnotation()
|
||||
public async Task EditAnnotation(int index)
|
||||
{
|
||||
try
|
||||
{
|
||||
ThumbnailLoading = true;
|
||||
|
||||
if (ThumbnailsView.SelectedItem == null)
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
CurrentAnnotation = (ThumbnailsView.SelectedItem as AnnotationThumbnail)!;
|
||||
CurrentAnnotation = (ThumbnailsView.Items[index] as AnnotationThumbnail)!;
|
||||
ThumbnailsView.SelectedIndex = index;
|
||||
|
||||
var ann = CurrentAnnotation.Annotation;
|
||||
ExplorerEditor.Background = new ImageBrush
|
||||
{
|
||||
@@ -224,7 +225,6 @@ public partial class DatasetExplorer
|
||||
var time = ann.Time;
|
||||
ExplorerEditor.RemoveAllAnns();
|
||||
ExplorerEditor.CreateDetections(time, ann.Detections, _annotationConfig.DetectionClasses, ExplorerEditor.RenderSize);
|
||||
ThumbnailLoading = false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -233,7 +233,11 @@ public partial class DatasetExplorer
|
||||
}
|
||||
finally
|
||||
{
|
||||
ThumbnailLoading = false;
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(100);
|
||||
ThumbnailLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -260,7 +264,7 @@ public partial class DatasetExplorer
|
||||
}
|
||||
}
|
||||
|
||||
private async Task DeleteAnnotations()
|
||||
public async Task DeleteAnnotations()
|
||||
{
|
||||
var tempSelected = ThumbnailsView.SelectedIndex;
|
||||
var result = MessageBox.Show("Чи дійсно видалити аннотації?","Підтвердження видалення", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||
|
||||
Reference in New Issue
Block a user