Scene Change Detection
Performs scene change and obstruction detection in a specified region of the video for OSHA compliance and other use cases.
Overview
The Scene Change Detection node keeps track of the changes in the ROI area in order to generate alarms if some anomaly is detected. It performs differentiated handling for objects types allowed to be within the ROI area bypassing the alarm in such case, and adds the OSHA analytics metadata to the frame metadata.
Inputs & Outputs
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : Queue Information
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 |
osha_compliance_type | OSHA compliance monitoring type. Options: Stacking of boxes/palettes < 7ft high (stacking); Pathways unblocked (pathway); Fire extinguishers unblocked (fire_extinguisher); Electrical panels unblocked (electrical_panel); Doors unblocked (door); Other - Generic (other). | enum | pathway | No |
objects_allowed | Object classes that will bypass the alarm when present in the ROIs. | model-labels | person | No |
change_threshold | Amount of change above which an alarm will be triggered for an ROI, adjusted for ROi size. Increase to reduce false alarms and reduce to detect smaller obstructions. Range: minimum 0, maximum 100.0. Step: 0.1. Unit: %. | float | 1.5 | Yes |
alarm_buffer_seconds | Time for which an obstruction should be detected to trigger an alarm. Unit: seconds. | number | 10 | No |
detection_algorithm | Algorithm used to detect scene changes. SSIM is recommended for better accuracy. Options: Fast (edge): Uses edge detection to compare reference and current frames. Sensitive to lighting changes; Accurate (ssim): Uses SSIM with temporal smoothing. More robust to lighting changes and noise. | enum | edge | No |
reference_image_mode | Set this property to 'No Update' after you have deployed once with the best reference image. Options: Latest stream snapshot (stream_snapshot); Live view at deployment start (deployment_start); No Update (no_update): Do not update the reference image. If no reference exists, set to live view at deployment start. | enum | stream_snapshot | No |
reference_update_interval | When set to 0, load reference frame only in deployment initialization. Otherwise refresh every N seconds subject to the mode above, if no alarm is triggered. Set this to non-zero if you encounter false positives with gradually changing lighting patterns. Unit: seconds. | number | 0 | No |
processing_interval | Minimum time between scene change checks. 0 checks every frame. Increase to reduce CPU load at the expense of slightly delayed detections. Range: minimum 0, maximum 5000. Step: 100. Unit: milliseconds. | integer | 0 | No |
reference_update_trigger | Trigger the reference image update subject using the mode above, when this condition evaluates to true. | trigger-condition | null | No |
tracking_mode | Tracking mode. Options: Centroid (centroid); Top center (top-center); Bottom center (bottom-center); Left center (left-center); Right center (right-center); All points (all). | enum | centroid | No |
display_roi | Display ROI on video? Options: Detailed (detailed); Simplified (simplified); None (none). | enum | detailed | No |
display_objects | Display objects on video? | bool | false | No |
display_debug_info | Display debugging info? | bool | false | No |
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>.exception_alarm_rois_count | integer | Number of ROIs that are triggering an alarm |
nodes.<node_id>.exception_alarm_rois_delta | integer | Difference of the number of ROIs creating alarm between last frame and this frame |
nodes.<node_id>.exception_alarm_rois_ids | list | The IDs of the ROIs that are generating an exception alarm |
nodes.<node_id>.exception_allowed_rois_count | integer | Number of ROIs that are bypassing an alarm because there's an allowed object within the ROI area |
nodes.<node_id>.exception_allowed_rois_ids | list | The IDs of the ROIs that are bypassing an exception alarm |
nodes.<node_id>.exception_allowed_rois_delta | integer | Difference of the number of ROIs bypassing alarm between last frame and this frame |
nodes.<node_id>.clear_rois_count | integer | Number of ROIs that are not triggering any alarm |
nodes.<node_id>.clear_rois_delta | integer | Difference of clear ROIs between last frame and this frame |
nodes.<node_id>.reference_image_updated | boolean | Set as True in the frame the reference image is updated |
nodes.<node_id>.rois.<roi_label>.type | string | OSHA compliance monitoring type |
nodes.<node_id>.rois.<roi_label>.change_score | float | The change score obtained from the comparison between the reference image and current frame |
nodes.<node_id>.rois.<roi_label>.state | string | The state of the ROI can be either clear or alarm |
nodes.<node_id>.rois.<roi_label>.time_since_last_state_change | float | The amount of seconds passed since the state changed |
nodes.<node_id>.rois.<roi_label>.coords | array | Array of pixel coordinates defining the configured ROI or line. |
nodes.<node_id>.rois.<roi_label>.change_threshold | float | Amount of change above which an alarm will be triggered for an ROI |
nodes.<node_id>.rois.<roi_label>.current_objects.<object_id>.first_seen | number | Pipeline timestamp when the object first entered the ROI. |
nodes.<node_id>.rois.<roi_label>.current_objects.<object_id>.first_seen_utc | string | UTC timestamp when the object first entered the ROI. |
nodes.<node_id>.rois.<roi_label>.current_objects.<object_id>.time_present | number | Time in seconds that the object has been present in the ROI. |
nodes.<node_id>.rois.<roi_label>.current_objects.<object_id>.allowed | boolean | Boolean indicating whether the object matches the configured allowed-object criteria. |
nodes.<node_id>.monitoring_type | string | OSHA compliance monitoring type |
nodes.<node_id>.description | string | |
nodes.<node_id>.type | string | OSHA compliance monitoring type |
JSON example
{
"nodes": {
"scene_change_detection1": {
"clear_rois_count": 0,
"clear_rois_delta": 0,
"description": "value",
"exception_alarm_rois_count": 0,
"exception_alarm_rois_delta": 0,
"exception_alarm_rois_ids": [],
"exception_allowed_rois_count": 0,
"exception_allowed_rois_delta": 0,
"exception_allowed_rois_ids": [],
"monitoring_type": "value",
"reference_image_updated": false,
"rois": {
"roi1": {
"change_score": 0.0,
"change_threshold": 0.0,
"coords": [],
"current_objects": {
"object_id": {
"allowed": false,
"first_seen": 0.0,
"first_seen_utc": "value",
"time_present": 0.0
}
},
"state": 0,
"time_since_last_state_change": 0.0,
"type": "value"
}
},
"type": "scene_change_detection"
}
}
}Updated 18 days ago
Did this page help you?
