Vision Language Model Lookup
Perform a lookup with Vision Language Models (VLM) on objects in an ROI, or on a ROI in the frame. Supports models like GPT-4o, Claude, Gemini, Llama using Lumeo Cloud, Google, OpenAI, Anthropic, Nvidia, AWS Bedrock.
Overview
The Vision Language Model Lookup node is designed to perform lookups using Vision Language Models (using Lumeo Cloud, Google, OpenAI, Anthropic, Nvidia, AWS Bedrock) on objects within a Region of Interest (ROI), or on a ROI within the frame. This functionality is useful for applications requiring advanced recognition and understanding of objects or areas within a video feed.
Inputs & Outputs
- Inputs: 1, Media Format: Raw Video
- Outputs: 1, Media Format: Raw Video
- Output Metadata:
nodes.node_id,recognized_objs,recognized_obj_ids,recognized_obj_count,recognized_obj_delta,value_changed_delta,unrecognized_obj_count,unrecognized_obj_delta
Properties
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
roi_labels | Regions of interest labels | string | — | No |
rois | Regions of interest. Conditional on roi_labels. Format: comma-separated normalized x,y coordinate pairs; separate multiple polygons with semicolons (for example, 0.1,0.1,0.9,0.1,0.9,0.9). | string | null | No |
processing_mode | Processing mode. Options: ROIs, at Interval (rois_interval); ROIs, upon Trigger (rois_trigger); Objects in an ROI (objects). | enum | rois_interval | Yes |
interval | Collect objects or ROIs for lookup atleast this many seconds apart. Unit: seconds. | float | 10 | No |
trigger | Queue ROI for lookup when this condition evaluates to true. Conditional on processing_mode being rois_trigger. | trigger-condition | null | No |
batch_mode | ROI batch mode. Options: Single (single): Lookup current ROI image only; Batch (batch): Lookup last n images of the ROI; Compare with reference (reference): Lookup current ROI image and reference image. | enum | single | No |
reference_image_mode | Reference image source. Options: Latest stream snapshot (stream_snapshot); Live view at deployment start (deployment_start); Image URL (url). Conditional on batch_mode being reference. | enum | deployment_start | No |
reference_image_url | Reference image URL. Conditional on reference_image_mode being url. | string | null | Yes |
batch_size | Number of images to process in each request. Set to more than 1 to use prompts that reference multiple images. Conditional on batch_mode being batch. Unit: images. | number | 1 | No |
enable_prebuffer | If true, samples ROI at Lookup interval to fill batch, and performs lookup when trigger is met. Else performs lookup when batch is full. Conditional on processing_mode being rois_trigger. | bool | false | No |
objects_to_process | ex. car,person,car.red. Conditional on processing_mode being objects. | model-labels | null | No |
obj_lookup_mode | Object lookup mode. Options: Until result (until_result): Lookup on interval or size change, until a result is obtained or max attempts are exhausted; Continuously (continuous): Periodically, at an interval. Conditional on processing_mode being objects. | enum | until_result | No |
tracking_mode | Tracking mode. Options: Centroid (centroid); Top center (top-center); Bottom center (bottom-center); Left center (left-center); Right center (right-center). Conditional on processing_mode being objects. | enum | centroid | No |
min_obj_size_pixels | Min. width and height of an object. Conditional on processing_mode being objects. | number | 64 | No |
obj_lookup_size_change_threshold | If the size of an object changes by more than this threshold, perform a lookup. Conditional on processing_mode being objects. Range: minimum 0.01, maximum 2.0. Step: 0.2. | float | 0.1 | No |
max_lookups_per_obj | Maximum number of attempts to perform a lookup for an object in the Until result lookup mode. Conditional on processing_mode being objects. | number | 5 | No |
model_provider | Model provider. Options: Lumeo Cloud (lumeo): Use best-in-class models augmented via Lumeo cloud. Requires Lumeo cloud model credits; AWS Bedrock Cloud (aws): Defaults to llama-3.2-11b-vision-instruct. Overridable using custom model; Anthropic Cloud (anthropic): Defaults to claude-3-5-sonnet-latest. Overridable using custom model; Google Cloud (google): Defaults to gemini-1.5-flash. Overridable using custom model; OpenAI Cloud (openai): Defaults to gpt-4o. Overridable using custom model; Nvidia NIM Cloud (nvidia): Defaults to llama-3.2-11b-vision-instruct. Overridable using custom model; Self-hosted (self): A self-hosted model or local Nvidia NIM instance compatible with OpenAI chat completion API. | enum | lumeo | No |
model_url | Complete URL for a OpenAI-compatible chat completions API endpoint. Conditional on model_provider being self. | string | http://localhost:11434/v1/chat/completions | Yes |
aws_region | AWS region for Bedrock models. Conditional on model_provider being aws. | string | us-east-1 | No |
api_key | API key for the model provider. For AWS Bedrock, provide it in format: <ACCESS_KEY_ID>:<SECRET_ACCESS_KEY>. Required only when Model provider is NOT lumeo. | string | null | No |
custom_model | Required if Model provider is Self-hosted. For other providers, optional. Overrides provider-specific default model if specified. See docs for supported models for selected provider. | string | null | No |
prompt | Provide a prompt, additional instructions or context for the model. | string | null | No |
description_mode | Generate a description of the scene or objects in the images. This description will be used for search and summarization. Options: None (none); When any attribute is detected (when_attributes_present); When alert attribute is true (when_alert_present); Always describe image or object (always). | enum | none | No |
attributes | Provide attribute names and for each attribute, a question or description with optional answer choices to extract the attribute value. Special attributes if present: description overrides description mode, alert describes condition to trigger an alert and alert_message overrides the message to display when an alert is triggered. | json | {"vehicle_type": "Vehicle type: car|bus|van", "violence": "Is there any violence in the scene?", "weapons": "Is the person carrying a weapon?"} | No |
objects_to_extract | Provide labels, corresponding description describing the object and (optionally) properties for objects to extract. Will insert detected objects with bounding boxes and attributes in Lumeo metadata. Note: Only works with Lumeo Cloud or Google Gemini models. | json | {} | No |
detail_level | Maximum image resolution. Options: Low (low); High (high). | enum | low | No |
max_tokens | Maximum number of tokens to return for each request. Unit: tokens. | number | 500 | No |
display_roi | Display ROI on video? | bool | true | No |
display_objinfo | Display results on video? Options: Disabled (disabled); Bottom left (bottom_left); Bottom right (bottom_right); Top left (top_left); Top right (top_right); Inside top left (top_left_inside); Inside bottom left (bottom_left_inside). | enum | bottom_left | No |
debug | Log debugging information? | bool | false | No |
bbox_mode | Treat bounding box coordinates returned by the model as absolute or normalized to the ROI, and in the format specified. Options: Model default (default); Absolute XYXY (absolute_xyxy); Absolute YXYX (absolute_yxyx); Normalized XYXY (normalized_xyxy); Normalized YXYX (normalized_yxyx). | enum | default | No |
bbox_adjustment_factor | Divide the bounding box coordinates from the model by this factor to convert to normalized coordinates (0-1) for normalized bounding box mode. Leave empty to use defaults. | number | null | No |
Prompt Examples
Generate scene description.
Analyze the scene and provide a concise description of any unique, interesting, or noteworthy elements that would be suitable for a push notification alert. Focus on key details that capture the essence of what's happening or what's important in the image.
Attribute Examples
Providing explicit attributes lets the model return structured output that will be added as ROI or object attributes.
Each attribute is a key-value pair. Key is the attribute name, and value is the instruction for the model to extract the attribute.
The model will return the extracted attribute value as a string, which will be added as an attribute to the object/ROI.
Describe the image
{"description": "Describe the image briefly."}
Describe the image and add attributes for vehicle type and numbers
{"description": "Describe the image briefly. Return null if no vehicle is present.", "vehicle_type": "Comma separated list of vehicle types: car\|bus\|van", "vehicle_numbers": "Comma separated list of vehicle numbers"}
Add an alert flag in the metadata
{"alert": "Is this person wearing a pink shirt?"}
Publishing attributes as metrics
The Publish Metrics and Publish to BigQuery nodes can publish VLM ROI attributes. They read nodes.<vlm_node_id>.rois.<roi_label>.attributes and send one Node Metadata record or BigQuery row for each non-null attribute. For example, "vehicle_type": "car" is published as:
{
"node_type": "vlm",
"roi_label": "roi1",
"node_meta": {
"roi_label": "roi1",
"attributes": {
"name": "vehicle_type",
"value": "car"
}
}
}Attribute values retain their string, number, or boolean type; null values are omitted. With no explicit trigger on the publisher, the VLM's label_changed_delta fields ensure that only frames containing changed results are collected.
Objects to Extract Examples
Certain models support extracting bounding boxes by describing the objects you are looking to detect (this is highly experimental at the moment).
For those models, you can specify objects_to_extract as a JSON with each key being the object label and value being the description, as follows:
{"person_ppe_violation": "Person violating ppe protocol. Properties: vest=vest/no_vest, helmet=helmet/no_helmet, goggles=goggles/no_goggles"}
This will insert objects with label person_ppe_detection that match the description, and add the properties as object attributes.
Custom Model Names
| Model Provider | Format | Description |
|---|---|---|
aws | aws/<bedrock inference profile id> | Bedrock inference profiles can be found here. ex. aws/us.meta.llama3-2-11b-instruct-v1:0 |
google | google/<model_name> | Supported Model names can be found here. ex. google/gemini-1.5-flash-latest |
openai | openai/<model_name> | Model name can be found here. ex. openai/gpt-4o |
anthropic | anthropic/<model_name> | Model name can be found here. ex. anthropic/claude-3-5-sonnet-latest |
nvidia | <model_path> | Nvidia NIM Vision Language Models can be found here. Specify the model path as the model invoke url portion after the base url ( https://ai.api.nvidia.com/v1/) from the Nvidia docs. Ex., for a model invoke url of https://ai.api.nvidia.com/v1/vlm/nvidia/vila the model_path would be vlm/nvidia/vila |
self | <model_name> | Model name as required to be provided in OpenAI chat completions compatible endpoint. |
Output Metadata
The fields below are declared by this node's metadata schema; the JSON values are representative examples.
| Path | Type | Description |
|---|---|---|
nodes.<node_id>.rois.<roi_label>.label_changed_delta | boolean | When the VLM result of an ROI changes |
nodes.<node_id>.rois.<roi_label>.label_available | boolean | Boolean indicating whether the node has a current result for this ROI. |
nodes.<node_id>.rois.<roi_label>.label | string | Current model-generated result for this ROI. |
nodes.<node_id>.rois.<roi_label>.attributes.<attribute_name> | string, number, boolean, or null | String, number, boolean, or null produced for the configured model attribute. |
nodes.<node_id>.alert | boolean | While an alert is ongoing |
nodes.<node_id>.alert_message | string | Alert message or reason for the alert |
nodes.<node_id>.recognized_obj_count | integer | Number of objects successfully processed in the current frame. |
nodes.<node_id>.recognized_obj_delta | integer | When one or more new objects have a caption or resulting attributes assigned |
nodes.<node_id>.label_changed_obj_delta | integer | When the caption or resulting attributes of one or more objects changes |
nodes.<node_id>.unrecognized_obj_count | integer | Number of objects that could not be processed in the current frame. |
nodes.<node_id>.unrecognized_obj_delta | integer | When one or more objects fail to be assigned a caption or attributes |
nodes.<node_id>.recognized_obj_ids | array | Array of tracking IDs of objects successfully processed by the node. |
nodes.<node_id>.alert_obj_ids | array | Array of tracking IDs of objects associated with the current alert. |
nodes.<node_id>.objects_of_interest_keys | array | Array of metadata keys that contain object IDs relevant to downstream integrations. |
nodes.<node_id>.search_text | string | Text prepared by the node for downstream search or indexing. |
nodes.<node_id>.type | string | Identifies the node type that produced this metadata. |
JSON example
{
"nodes": {
"vlm1": {
"alert": false,
"alert_message": "value",
"alert_obj_ids": [],
"label_changed_obj_delta": 0,
"objects_of_interest_keys": [],
"recognized_obj_count": 0,
"recognized_obj_delta": 0,
"recognized_obj_ids": [],
"rois": {
"roi1": {
"attributes": {
"attribute_name": "value"
},
"label": "example",
"label_available": false,
"label_changed_delta": false
}
},
"search_text": "value",
"type": "vlm",
"unrecognized_obj_count": 0,
"unrecognized_obj_delta": 0
}
}
}Object labels and attributes
- Object labels/classes added: ROI mode adds the configured ROI label with class
10600. Object extraction adds model-returned labels, falling back tovlm_object, with class9998. - Object attribute labels/classes added: ROI objects receive
lvm_roi(10600); configured response values use10602; extracted objects receivevlm_extracted(9998) and extracted property values use9999; successful results addvlm_results(10601); generated object descriptions use10604.
{
"objects": [{
"id": 2775161862,
"source_node_id": null,
"model_id": null,
"label": "roi2",
"class_id": 10600,
"rect": {
"left": 128,
"top": 72,
"width": 512,
"height": 575
},
"probability": 1.0,
"attributes": [{
"label": "unblocked",
"class_id": 10602,
"probability": 1.0
}, {
"label": "lvm_results",
"class_id": 10601,
"probability": 1.0
}, {
"label": "lvm_roi",
"class_id": 10600,
"probability": 1.0
}],
"corr_id": "75f5141e-020a-4f27-af26-cf17b32c2544"
}]
}Updated 18 days ago
