Edge Impulse Classification
Classifies images or sound with a classification model trained in Edge Impulse. Video and audio analyzers use the same commands and fields; the model is uploaded as the .eim file exported from Edge Impulse Studio in the analyzer setting Model Path (.eim). For the procedure to create a model see Appendix B, External Services.
Commands
| Command | Description |
| Get Classification Result | Writes the class name and confidence of the most probable class. |
| Is Specific Class? | Checks whether the result matches the Target Class with confidence at or above the threshold. |
| Get All Results | Writes the probability of every class as JSON. |
| Is Anomaly? | Checks whether the model judged the input as an anomaly. Meaningful only for models that include anomaly detection. |
| Get Anomaly Score | Writes the anomaly detection score. |
Settings
| Setting | Description |
| Target Class | The class (label) name compared by Is Specific Class?. It must exactly match a label in the model. Example: cat, defect. |
| Threshold (%) | A result counts as matched only when its confidence is at or above this value. 0 to 100, default 50. |
Output Variables
| Field | Type | Value |
| Class Name | Text | Name of the most probable class. |
| Confidence (%) | Number | Confidence of that class, 0 to 100. |
| Is Match | Digital | True when the class equals the Target Class at or above the threshold. |
| Is Anomaly | Digital | True when judged as an anomaly. |
| Anomaly Score | Number | The anomaly detection score. |
| Output (JSON Text) | Text | Array of the probability of every class. |
JSON Output
An array with, per class, label and confidence (0 to 100), ordered from the highest probability.
[
{ "label": "normal", "confidence": 89 },
{ "label": "defective", "confidence": 11 }
]