Edge Impulse Object Detection
Detects objects in the camera video with an object detection model trained in Edge Impulse. The model is uploaded in the analyzer setting Model Path (.eim).
Commands
| Command | Description |
|---|---|
| Has Object | Checks whether an object is detected: the label typed in Object if set, any object if it is empty. |
| Count Objects | Writes the number of objects with that label (or all objects). |
| Get Object Info | Writes the class name, confidence, center point, and width and height of one object chosen by Select By. |
| Get All Objects Info | Writes every detected object as JSON. |
| Is Anomaly | Checks whether the model judged the input as an anomaly. |
| Get Anomaly Score | Writes the anomaly detection score. |
When a Detection Zone is set, only objects inside it are considered.
Settings
| Setting | Description |
|---|---|
| Object | The class (label) name to look for, typed directly. It must exactly match a label in the model; leave it empty to target all objects. |
| Confidence (%) | 0 to 100, default 50. |
| Detection Zone | See Common Items. |
| Select By | Best Confidence (default), Index, Largest, Closest. |
| Index (0-based) | The position to pick when Select By is Index. Uses the model's detection order; default 0. |
| Reference Point | See Common Items. |
Output Variables
| Field | Type | Value |
|---|---|---|
| Detected | Digital | True when an object is detected. |
| Count | Number | Number of detected objects. |
| Class Name | Text | Label of the selected object; an empty string when not detected. |
| Confidence (%) | Number | Confidence of the selected object, 0 to 100; -1 when not detected. |
| Center Point X / Center Point Y | Number | Pixel coordinates of the selected object's center; -1 when not detected. |
| Width (Pixels) / Height (Pixels) | Number | Size of the selected object's box. |
| Is Anomaly | Digital | True when judged as an anomaly. |
| Anomaly Score | Number | The anomaly detection score. |
| Output (JSON Text) | Text | Array of every detected object. |
JSON Output
A flat array with, per object, label, confidence (0 to 100), the box's top-left x and y, width, and height. Unlike the built-in Object Detection there are no nested bbox and center objects, and x and y are not the center.
[
{ "label": "person", "confidence": 87, "x": 100, "y": 50, "width": 200, "height": 350 },
{ "label": "car", "confidence": 75, "x": 400, "y": 200, "width": 150, "height": 100 }
]