mirror of
https://github.com/azaion/annotations.git
synced 2026-04-23 02:46:30 +00:00
add autodetection
This commit is contained in:
@@ -192,8 +192,8 @@ public partial class DatasetExplorer
|
||||
foreach (var ann in await YoloLabel.ReadFromFile(dto.LabelPath))
|
||||
{
|
||||
var annClass = _config.AnnotationClassesDict[ann.ClassNumber];
|
||||
var annInfo = new CanvasLabel(ann, ExplorerEditor.RenderSize, ExplorerEditor.RenderSize);
|
||||
ExplorerEditor.CreateAnnotation(annClass, time, annInfo);
|
||||
var canvasLabel = new CanvasLabel(ann, ExplorerEditor.RenderSize, ExplorerEditor.RenderSize);
|
||||
ExplorerEditor.CreateAnnotation(annClass, time, canvasLabel);
|
||||
}
|
||||
|
||||
ThumbnailLoading = false;
|
||||
@@ -343,4 +343,12 @@ public partial class DatasetExplorer
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddThumbnail(ThumbnailDto thumbnailDto, IEnumerable<int> classes)
|
||||
{
|
||||
var selectedClass = ((AnnotationClass?)LvClasses.SelectedItem)?.Id;
|
||||
|
||||
if (selectedClass != null && (selectedClass == -1 || classes.Any(x => x == selectedClass)))
|
||||
ThumbnailsDtos.Insert(0, thumbnailDto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user