Image Classification

Property Type Access Description
ShowAdvancedOptions bool get/set Whether to reveal advanced configuration in the editor. [default=false]. Toggle on to show options like classification filters and the script callback fields.
ModelSourceUrl Uri get/set Path to the AI model file (.onnx) used for image classification. Pick a classification-type model — detection or segmentation models won't work and will surface a warning. Loading a new model reinitialises the operator and resets the available classifications list.
ModelSize string get Size of the loaded model file, formatted as a string (read-only).
TotalClassifications int get Number of distinct labels the loaded model can classify (read-only). Reflects what the model was trained on — for example, a generic image-net model reports around 1000 labels, while a specialised model may report only a handful.
AutoStartClassification bool get/set Whether to start classifying automatically once the model finishes loading. [default=false]. Saves a manual click when the project is loaded fresh; turn off if you want to start classification only on demand from a script or button press.
OperatorState OperatorState get Current state of the operator (read-only). Reports whether the model is loading, ready, running, stopped, or in an error state.
StartCommand Command get Begin classifying incoming frames. Available once a valid classification model is loaded.
StopCommand Command get Stop classifying incoming frames.
AvailableClassifications StringCollectionEnum get/set Read-only list of every label the loaded model can predict. Useful for picking which class IDs or names to put in the filter fields.
FilteredClassesById string get/set Comma-separated list of class IDs to keep — everything else is ignored. Use this to narrow the operator's output to just the labels you care about (for example only "0,1" if your model puts your two classes of interest there). Leave empty to accept all classes.
FilteredClassesByName string get/set Comma-separated list of class names to keep — everything else is ignored. Easier to read than IDs when you know the labels (for example "cat,dog,bird"). Leave empty to accept all classes. Combine with FilteredClassesById for fine control.
ResetFiltersCommand Command get Clear both class filters so all classes are reported again.
Confidence int get/set Minimum confidence (in percent) a classification must score to be reported. [min=10, max=100, default=10]. Raise to suppress weak guesses — only highly confident predictions get through. Lower to surface marginal predictions, at the cost of more false positives.
DetectionIntervalFrames int get/set Run classification only every Nth frame. [min=0, max=1000, default=0 (every frame)]. Set to 0 to classify every frame for the most responsive results. Higher values reduce overall load by only running the model occasionally and reusing the previous answer in between — useful when scenes change slowly and you want to keep capacity free for other operators in the project.
MaxDetectionAgeFrames int get/set How many frames the last good classification stays valid if a later frame fails to classify. [min=0, max=60, default=0]. Higher values smooth over occasional misses by holding the last result; lower values react faster to genuine changes but show empty results during brief glitches.
ResetThresholdCommand Command get Reset all settings to their defaults (confidence, detection interval, max detection age).
ClassificationResult string get The single best label predicted for the most recent frame (read-only). Empty when no classification passes the confidence threshold or filters. Updated each time a frame is classified — once per frame at default settings.
ClassificationJson string get Most recent classification as a JSON string with label, confidence, frame number, and timestamp (read-only). Convenient payload for scripts and external systems — feed this directly into a callback function and parse fields on the receiving side.
ProcessedFramesCounter int get Total number of frames the operator has classified since it started (read-only).
ScriptCallbackFunction string get/set Name of a Script Engine function to call each time classification updates. Receives the JSON payload from ClassificationJson. Leave empty to disable. Useful for triggering scene switches, overlays, or alerts based on what the camera sees.

See also: Image Classification in Operators — user-facing introduction, screenshots, and section summaries.