Edge Impulse Visual Anomaly
Judges normal versus abnormal states with a visual anomaly detection model trained in Edge Impulse. The frame is divided into a grid, each cell receives an anomaly score, and the mean and maximum over the grid are provided. The model is uploaded in the analyzer setting Model Path (.eim).
Commands
| Command | Description |
| Get Result | Writes the mean score, max score, and anomaly verdict to variables. |
| Is Anomaly? | Checks whether the result is an anomaly by the threshold. |
| Get Grid Info | Writes the anomaly score of every grid cell as JSON. |
Settings
| Setting | Description |
| Anomaly Threshold (%) | Scores above this value are judged as anomalies. 0 to 100, default 50. |
Output Variables
| Field | Type | Value |
| Mean Score | Number | Mean anomaly score over all grid cells, 0 to 100. |
| Max Score | Number | Highest anomaly score among the grid cells, 0 to 100. |
| Is Anomaly | Digital | True when judged as an anomaly. |
| Output (JSON Text) | Text | A JSON object with the mean, max, and grid. |
JSON Output
A single object, not an array. Each cell in grid has its position x and y, size width and height, and anomaly score value (0 to 100).
{
"mean": 45,
"max": 78,
"grid": [
{ "x": 0, "y": 0, "width": 32, "height": 32, "value": 12 },
{ "x": 32, "y": 0, "width": 32, "height": 32, "value": 67 },
{ "x": 64, "y": 0, "width": 32, "height": 32, "value": 78 }
]
}