Generic Detector

Detect objects based on the similarity of text prompts and the images of objects in the frame.

Overview

The Generic Detector node is designed to detect objects within a video frame based on the similarity of text prompts and the images of objects. This functionality is useful for applications requiring identification and categorization of objects in real-time.

Inputs & Outputs

  • Inputs: 1, Media Format: Raw Video
  • Outputs: 1, Media Format: Raw Video
  • Output Metadata: Objects

Properties

PropertyDescriptionTypeDefaultRequired
model_idModel Type. Options: Yolo-Small (yolov8s-world); Yolo-Medium (yolov8m-world); Yolo-Large (yolov8l-world); OWL-Medium (owlvit-base-patch32); OWL-Large (v2) (owlv2-base).enumyolov8s-worldYes
class_listComma separated list of objects to detect, optionally with an alternate label.stringnullYes
intervalInfer on every nth frame. 1 means infer every frame. Range: minimum 1. Unit: frames.number1Yes
confidence_thresholdEnable to override the default minimum inference threshold for all classes. Range: 0-1. Recommended values usually are in the 0.001 to 0.2 range. Start with a low threshold value and progressively increase to reduce false positives. Range: minimum 0, maximum 1.0. Step: 0.01. Precision: 4 decimal places.float0.1No
per_class_thresholdsComma separated list of per-class thresholds. Leave empty to use the default threshold for all classes.stringnullNo
iou_thresholdIncrease the threshold to reduce potential duplicate detections of a single object. Range: minimum 0, maximum 1.0. Step: 0.1.float0.5No
min_object_sizeMinimum object sizestringnullNo
source_objectsLook for objects within these object types. Leave empty to detect objects within the entire frame.model-labelsnullNo
enable_max_optimizationsEnable advanced optimizations to improve performance. This currently increases deployment start time.boolfalseNo
clear_cacheSet to true to clear model cache. This will increase deployment start time.boolfalseNo

Output Metadata

The fields below are declared by this node's metadata schema; the JSON values are representative examples.

PathTypeDescription
objectsarrayValue of objects.
objects[].attributesarrayValue of attributes.
objects[].attributes[].class_idintegerValue of class id.
objects[].attributes[].labelstringValue of label.
objects[].attributes[].probabilitynumberValue of probability.
objects[].class_idintegerValue of class id.
objects[].idintegerValue of id.
objects[].labelstringValue of label.
objects[].probabilitynumberValue of probability.
objects[].rect.heightintegerValue of height.
objects[].rect.leftintegerValue of left.
objects[].rect.topintegerValue of top.
objects[].rect.widthintegerValue of width.

JSON example

{
  "objects": [
    {
      "attributes": [
        {
          "class_id": 0,
          "label": "example",
          "probability": 0.9
        }
      ],
      "class_id": 0,
      "id": 1,
      "label": "person",
      "probability": 0.95,
      "rect": {
        "height": 320,
        "left": 120,
        "top": 80,
        "width": 160
      }
    }
  ]
}

Object labels and attributes

  • Object labels/classes added: Each detected object uses the configured output label and its configured prompt/class index.
  • Object attribute labels/classes added: Dot-suffixed values in a configured label (for example, vehicle.red) are added as attributes with class 28999.

Did this page help you?