Getting Started Cameras & Video Detection & Recording Automation & Events Actions Integration & Connectivity Network & Discovery AI & Remote Control MQTT Modbus ZeroMQ System & Administration Use Cases Troubleshooting About & Legal
Home / Documentation / YOLO Detection
Knowledge base

YOLO Detection

YoloDetectionTask runs object detection on incoming video frames through a selected YoloWorker. Use it to detect people, vehicles, animals, or other model classes and turn accepted detections into Banalytics MotionEvent automation signals.

Classify frames, filter detections, and fire MotionEvent

The task submits frames to a YOLO worker asynchronously, filters results by target class and zone, optionally draws bounding boxes and labels, updates the motion flag in the execution context, and emits MotionEvent when configured conditions are met.

AI

Object classes

Keep only the model classes that matter for the scene, such as person, car, truck, or dog.

ZONE

Detection zones

Use trigger and insensitive areas to make events depend on where accepted objects appear in the frame.

EVT

Motion events

Downstream rules receive triggered class names, triggered zones, and relative overlap area.

Define what should count as a real detection

ALL

Full-frame object detection

Leave detectionAreas empty when any accepted object anywhere in the frame should fire a MotionEvent. In this mode the event uses the wildcard zone *.

ZONE

Zone-based alarm

Draw trigger zones for places where object presence matters, such as entrance, driveway, gate, shelf, loading area, or restricted zone.

IGN

Ignore noisy regions

Add insensitive areas over TV screens, reflections, roads outside the protected area, moving trees, or busy background zones.

CLS

Class-specific detection

Select only the required classes in targetClasses. An empty list accepts all classes returned by the selected worker model.

Tune thresholds for false positives and missed objects

Conservative alarm
Increase confidenceThreshold, use trigger zones, and set a longer eventStunTimeMillis when false positives are costly.
Sensitive monitoring
Lower confidenceThreshold carefully while validating with drawn classes. This can reveal small or distant objects but increases noise.
Overlap cleanup
Lower nmsThreshold to suppress overlapping boxes more strongly, or raise it to keep more neighboring boxes.
Duplicate suppression
Increase eventStunTimeMillis to avoid repeated notifications while the same class and zone set remains unchanged.

Control inference cost without changing camera FPS

DELAY

Use detection delay first

Increase detectionDelay when inference is too expensive or worker wait time grows. Lower it only when the worker has spare capacity and faster reaction is needed.

GATE

Run after motion detection

Place YOLO after MotionDetectionTask when classification should run only on motion-relevant frames. This is usually cheaper than classifying every camera frame.

DRAW

Disable drawing for clean output

Keep drawClasses=true while tuning. Disable it when the output stream must stay clean or when rendering overhead matters.

Asynchronous behavior: bounding boxes drawn on a frame are the latest accepted detection results, not necessarily inference results from that exact frame.

Configuration parameters

ParameterRequiredDescriptionDefault
Image classification model
YesReference to a running YoloWorker that provides YOLO inference.None
Target classes
OptionalJSON array of class names to keep. Empty array means all classes from the selected model are accepted.[]
Confidence threshold
YesMinimum class confidence before NMS and event filtering. Allowed range is 0.1-1.0.0.6
NMS
YesNon-Maximum Suppression IoU overlap threshold. Allowed range is 0.05-1.0.0.7
Detection areas
OptionalSerialized trigger and insensitive zone polygons used to filter detections by area.Empty
Show classes
YesDraws accepted bounding boxes and class labels on output frames.true
Classification delay
YesMinimum interval in milliseconds between YOLO inference submissions. Allowed range is 100-10000.500
Stun events (ms)
YesMinimum interval before repeated MotionEvent firing for the same class-count and zone set.1
Font scale
YesLabel font scale factor. Allowed range is 0.3-2.0.0.6

MotionEvent fields from YOLO detection

FieldTypeDescriptionUse
triggeredZones
String[]Zone identifiers overlapped by accepted detections, or ["*"] when no zones are configured.Route by area
triggeredClasses
String[]Distinct class names that passed filtering.Route by object type
relativeOverlapArea
doubleSum of accepted detection bounding-box areas divided by the frame area.Rough coverage signal
sourceTaskUuid
UUIDIdentifier of the YoloDetectionTask that fired the event.Diagnostics
Class names must match: target class names must match the worker model's config.names exactly. Use the UI selector populated from the worker to avoid spelling mismatches.

Operational notes

RUN

Worker must be running

If the selected worker is stopped or overloaded, the video stream can continue but detections may be delayed or absent.

STAT

Use worker statistics

High wait time usually means too many detection tasks, too few workers, too low detectionDelay, or a model/backend that is too slow.

AREA

Coverage is approximate

relativeOverlapArea is useful for rough object coverage, not for physical size measurement.

EVT

Events are motion events

The task emits MotionEvent, not separate object identity events. Use Event Manager rules or actions to route, store, or notify on those events.

Related classification pages

Related tasks and pages