The AI Model by Roboflow node allows for running a Roboflow AI Model inference on input frames, and adds detected objects to metadata. This functionality is useful for applications requiring object detection and recognition.
Inputs & Outputs
Inputs : 1, Media Format : Raw Video
Outputs : 1, Media Format: Raw Video
Output Metadata : Objects metadata
Properties
Property
Description
Type
Default
Required
model_id
Model alias or ID from Roboflow. Typical format is {project_id}/{version}.
string
null
Yes
model_type
Model type. Options: detector, classifier.
enum
detector
Yes
roboflow_api_key
Roboflow Private API Key (for inference) can be found at Account -> Settings -> Workspace -> Roboflow API in your Roboflow account.
string
null
Yes
inference_mode
Inference mode. Options: full_frame (Run inference on entire frame), objects (Run inference on specific object types, ex for classification).
enum
full_frame
Yes
objects_to_infer
Object types and classes to include. Leave blank to include all. Conditional on inference_mode being objects.
model-label
null
No
interval
Infer on every nth frame. 1 means infer every frame.
number
1
Yes
confidence_threshold
Enable to override the default minimum inference threshold for all classes. Slider min: 0, max: 1.0, step: 0.1.
slider-optional
0.5
No
iou_threshold
Increase the threshold to reduce potential duplicate detections of a single object. Slider min: 0, max: 1.0, step: 0.1. Conditional on model_type being detector.
slider-optional
0.5
No
min_object_size
Minimum object size, e.g., width x height. Conditional on model_type being detector.
string
null
No
reclassify_size_threshold
Reclassify a specific object if size changes by this percent. Only used when inference mode objects, and Track objects node is present before this node. Conditional on model_type being classifier.
number
50
No
max_classify_attempts
Attempt classification per object this many times before giving up if it yields no class results. Only used when inference mode objects, and Track objects node is present before this node. Conditional on model_type being classifier.
number
3
No
Metadata
Metadata Property
Description
objects
List of Objects detected by the Model inference nodes. See table below for the format of this property.
Bounding box for this object. Contains: left, top, width, height
attributes
Dictionary
Object's classes, as identified by Classifier models chained to this Object Detection model. Contains: label : Class label, probability : Probability, class_id : Unique id for the class' label