mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:06:30 +00:00
fix loader bug with _CACHED_HW_INFO
put tile size to name and set it dynamically for AI recognition
This commit is contained in:
@@ -4,16 +4,10 @@ using Azaion.Common.DTO;
|
||||
|
||||
namespace Azaion.Common.Services;
|
||||
|
||||
public class TileResult
|
||||
public class TileResult(CanvasLabel tile, List<CanvasLabel> detections)
|
||||
{
|
||||
public CanvasLabel Tile { get; set; }
|
||||
public List<CanvasLabel> Detections { get; set; }
|
||||
|
||||
public TileResult(CanvasLabel tile, List<CanvasLabel> detections)
|
||||
{
|
||||
Tile = tile;
|
||||
Detections = detections;
|
||||
}
|
||||
public CanvasLabel Tile { get; set; } = tile;
|
||||
public List<CanvasLabel> Detections { get; set; } = detections;
|
||||
}
|
||||
|
||||
public static class TileProcessor
|
||||
@@ -41,7 +35,7 @@ public static class TileProcessor
|
||||
private static TileResult GetDetectionsInTile(Size originalSize, CanvasLabel startDet, List<CanvasLabel> allDetections)
|
||||
{
|
||||
var tile = new CanvasLabel(startDet.Left, startDet.Right, startDet.Top, startDet.Bottom);
|
||||
var maxSize = new List<double> { startDet.Width + BORDER, startDet.Height + BORDER, Constants.AI_TILE_SIZE }.Max();
|
||||
var maxSize = new List<double> { startDet.Width + BORDER, startDet.Height + BORDER, Constants.AI_TILE_SIZE_DEFAULT }.Max();
|
||||
var selectedDetections = new List<CanvasLabel>{startDet};
|
||||
|
||||
foreach (var det in allDetections)
|
||||
|
||||
Reference in New Issue
Block a user