DetectionEvents¶
processing extra: detection-events
Turn the detections attached to frames into small JSON events, with at most
one event per class every interval seconds.
- Node type:
DetectionEvents- Input:
ImagePayloadwithmeta['detections']- Output:
ObjectPayload- Extra:
detection-events
$ pip install "juturna-nodes[detection-events]"
The node README describes the input it reads, the events it emits, and the limits of the node.
How it works¶
The detections of a frame are grouped by label. A label produces an event
when its last event is at least interval seconds older, measured on the
payload.timestamp of the frames. Frames without detections produce nothing.
The time of the last event of each label is kept in the node state.
Arguments¶
Argument |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Minimum seconds between two events of the same label; |
Input message¶
Field |
Use |
|---|---|
|
List of |
|
Time of the frame, used for |
|
Copied into the event |
|
Copied into the event as |
The image itself is not read.
Output message¶
One message per label that passes the interval, with the version of the
frame:
{
"event": "detection",
"label": "person",
"count": 2,
"objects": [
{"confidence": 0.87, "bbox": [12, 40, 210, 400]},
{"confidence": 0.55, "bbox": [300, 52, 410, 380]}
],
"frame": 152,
"timestamp": 1763312345.12,
"width": 640,
"height": 480
}
Limits¶
Events are per label, not per object: there is no tracking.
DetectorYolokeeps its ultralytics results inmeta['annotations'], which this node does not read.
License¶
Code: this node is part of juturna-nodes, MIT (its
LICENSEfile).Third-party runtime: none beyond the juturna core (MIT); the node uses the Python standard library.
Configuration¶
Default node arguments, as defined in the node config.toml file. Any of
them can be overridden in the node configuration of a pipeline.
[arguments]
interval = 1.0
[meta]
Pipeline usage¶
{
"name": "events",
"type": "DetectionEvents",
"configuration": { "interval": 2.0 }
}
Reference¶
- class DetectionEvents(interval: float, **kwargs)
Emit at most one event per detected class every interval