AI Model by Roboflow

Run a Roboflow AI Model inference on input frames, and add detected objects or object classes to metadata.

Overview

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

PropertyDescriptionTypeDefaultRequired
model_idModel alias or ID from Roboflow. Typical format is {project_id}/{version}.stringnullYes
model_typeModel type. Options: detector, classifier.enumdetectorYes
roboflow_api_keyRoboflow Private API Key (for inference) can be found at Account -> Settings -> Workspace -> Roboflow API in your Roboflow account.stringnullYes
inference_modeInference mode. Options: full_frame (Run inference on entire frame), objects (Run inference on specific object types, ex for classification).enumfull_frameYes
objects_to_inferObject types and classes to include. Leave blank to include all. Conditional on inference_mode being objects.model-labelnullNo
intervalInfer on every nth frame. 1 means infer every frame.number1Yes
confidence_thresholdEnable to override the default minimum inference threshold for all classes. Slider min: 0, max: 1.0, step: 0.1.slider-optional0.5No
iou_thresholdIncrease 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-optional0.5No
min_object_sizeMinimum object size, e.g., width x height. Conditional on model_type being detector.stringnullNo
reclassify_size_thresholdReclassify 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.number50No
max_classify_attemptsAttempt 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.number3No

Metadata

Metadata PropertyDescription
objectsList of Objects detected by the Model inference nodes. See table below for the format of this property.
'objects': [{
    'id': 5750484150146564100,
    'label': 'car',
    'class_id': 0,
    'probability': 0.70000000149011612,
    'rect': {
        'width': 47,
        'top': 201,
        'left': 656,
        'height': 25
    },
    'attributes': [{
        'label': 'white',
        'probability': 0.9437278509140015,
        'class_id': 10
    }]
}]

Object Properties

KeyTypeDescription
idLong Int, OptionalIf present, it is a unique ID assigned to this object by a Track Objects Node
labelStringLabel for this object as outlined in Model Labels
class_idIntUnique id for this object's label.
probabilityFloatProbability of detection
rectDictionaryBounding box for this object. Contains: left, top, width, height
attributesDictionaryObject'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