mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:56:29 +00:00
small fixes, renames
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
using System.IO;
|
||||
using Azaion.Annotator.DTO;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Azaion.Annotator.Extensions;
|
||||
using Azaion.Common.DTO;
|
||||
using Azaion.Common.DTO.Config;
|
||||
using Azaion.Common.Services;
|
||||
using Azaion.CommonSecurity.Services;
|
||||
using Compunet.YoloV8;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -34,11 +33,10 @@ public class YOLODetector(IOptions<AIRecognitionConfig> recognitionConfig, IReso
|
||||
}
|
||||
|
||||
imageStream.Seek(0, SeekOrigin.Begin);
|
||||
var image = Image.Load<Rgb24>(imageStream);
|
||||
|
||||
using var image = Image.Load<Rgb24>(imageStream);
|
||||
var result = await _predictor.DetectAsync(image);
|
||||
|
||||
var imageSize = new System.Windows.Size(image.Width, image.Height);
|
||||
|
||||
var detections = result.Select(d =>
|
||||
{
|
||||
var label = new YoloLabel(new CanvasLabel(d.Name.Id, d.Bounds.X, d.Bounds.Y, d.Bounds.Width, d.Bounds.Height), imageSize, imageSize);
|
||||
|
||||
Reference in New Issue
Block a user