Get Started
Edge Impulse Classification
On this page
  1. Commands
  2. Settings
  3. Output Variables
  4. JSON Output

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

CommandDescription
Get Classification ResultWrites 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 ResultsWrites 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 ScoreWrites the anomaly detection score.

Settings

SettingDescription
Target ClassThe 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

FieldTypeValue
Class NameTextName of the most probable class.
Confidence (%)NumberConfidence of that class, 0 to 100.
Is MatchDigitalTrue when the class equals the Target Class at or above the threshold.
Is AnomalyDigitalTrue when judged as an anomaly.
Anomaly ScoreNumberThe anomaly detection score.
Output (JSON Text)TextArray 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 }
]