Detection utilities
Pure-хелперы для фильтрации, сортировки и чтения detection-результатов.
Detection By Index
Читает один DetectionResult по индексу.
In: Detections:DetectionResult, Index:Int
Out: Found, Detection, ClassId, Pos, Size, Confidence
После Computer Vision / AI нод с несколькими результатами.
Template Multi.Result → Detection By Index(Index=2).
Filter By Class
Фильтрует detections по class id.
In: Detections, ClassId:Int
Out: Results, Found, Count
После model detection.
Objects → Filter By Class(enemy).
Largest Detection
Выбирает detection с максимальной площадью.
In: Detections
Out: Found, Detection, Pos, Size, Area, Confidence
Когда самый крупный объект важнее ближайшего.
Выбрать самый большой visible target.
Detection Size
Возвращает размер первого detection.
In: Detection:DetectionResult
Out: Size:Vec2, Width:Float, Height:Float
Проверять размер найденного объекта.
Detection Size.Width > 50 → If.
Sort Detections
Сортирует detections по confidence, distance, area, x или y.
In: Detections, Mode:String, Reference:Vec2, Descending:Bool
Out: Results, Count
Mode задаёт критерий сортировки.
Sort by distance → Detection By Index(0).
Detection Exists
Проверяет, есть ли detections.
In: Detections
Out: Exists:Bool, Count:Int
Удобная проверка после фильтров.
Filter By Class.Results → Detection Exists → If.
Object Count
Сравнивает число найденных объектов с value.
In: Detections, Operator:String, Value:Int
Out: Result:Bool, Count:Int
Object Count(>, 3) → If → приоритет AOE.