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 | Comma separated list of labels for each ROI in the rois list | hidden | null | true |
rois | Regions of interest. References roi_labels for keys | polygon | null | true |
osha_compliance_type | OSHA compliance monitoring type. Options: - stacking : Stacking of boxes/palettes < 7ft high- pathway : Pathways unblocked- fire_extinguisher : Fire extinguishers unblocked- electrical_panel : Electrical panels unblocked- door : Doors unblocked- other : Other - Generic | enum | pathway | false |
objects_allowed | Object classes that will bypass the alarm when present in the ROIs | model-label | person | false |
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: 0-100% | slider | 1.5 | true |
alarm_buffer_seconds | Time for which an obstruction should be detected to trigger an alarm | number | 10 | false |
reference_image_mode | Update reference image mode. Options: - stream_snapshot : Latest stream snapshot- deployment_start : Live view at deployment start- no_update : Do not update the reference image. If no reference exists, set to live view at deployment start | enum | stream_snapshot | false |
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 | number | 0 | false |
reference_update_trigger | Trigger the reference image update subject using the mode above, when this condition evaluates to true | trigger-condition | null | false |
tracking_mode | The point to be used as tracking point. Options: - centroid - top-center - bottom-center - left-center - right-center - all | enum | centroid | false |
display_roi | Display ROI on video. Options: - detailed - simplified - none | enum | detailed | false |
display_objects | Display objects on video | bool | false | false |
display_debug_info | Display debugging info | bool | false | false |
Metadata
Metadata Property | Description |
---|---|
nodes.<node_id> | <node_id> for the Scene Change Detection is of the form scene_change_detectionX (ex. scene_change_detection1 ) \n \nFormat : as defined in the table below. |
Example
"nodes": {
"scene_change_detection1": {
"type": "scene_change_detection",
"clear_rois_count": 0,
"clear_rois_delta": 0,
"description":"Scene Change Detection",
"exception_alarm_rois_count": 1,
"exception_alarm_rois_delta": 0,
"exception_alarm_rois_ids":[
"polygon1"
],
"exception_allowed_rois_count": 0,
"exception_allowed_rois_delta": 0,
"exception_allowed_rois_ids": [],
"monitoring_type": "pathway",
"reference_image_updated": false,
"rois": {
"<roi_label>": {
"coords": [
[468, 172],
[597, 307],
[912, 206],
[1227, 277],
[1247, 135],
[1054, 91],
[946, 121],
[797, 87],
[645, 104],
[468, 172]
],
"current_objects":{
"1496812582445515449":{
"allowed": false,
"first_seen": 248.4,
"first_seen_utc": "2023-02-10T03:32:09.180692Z",
"time_present": 0.867
},
"1496812582445515453":{
"allowed": false,
"first_seen": 249.0,
"first_seen_utc": "2023-02-10T03:32:09.266444Z",
"time_present": 0.267
}
},
"state":"alarm",
"time_since_last_state_change": 37.6,
"type":"pathway",
"change_threshold": 1.0,
"change_score": 0.3
}
}
}
}
Format
Key | Type | Description |
---|---|---|
clear_rois_count | Integer | Number of ROIs that are not triggering any alarm |
clear_rois_delta | Integer | Difference of clear ROIs between last frame and this frame |
description | String | |
exception_alarm_rois_count | Integer | Number of ROIs that are triggering an alarm |
exception_alarm_rois_delta | Integer | Difference of the number of ROIs creating alarm between last frame and this frame |
exception_alarm_rois_ids | List | The IDs of the ROIs that are generating an exception alarm |
exception_allowed_rois_count | Integer | Number of ROIs that are bypassing an alarm because there's an allowed object within the ROI area |
exception_allowed_rois_delta | Integer | Difference of the number of ROIs bypassing alarm between last frame and this frame |
exception_allowed_rois_ids | List | The IDs of the ROIs that are bypassing an exception alarm |
monitoring_type | String | OSHA compliance monitoring type |
reference_image_updated | Boolean | Set as True in the frame the reference image is updated |
<roi_label> | Array of dictionaries | Contains information about this specific ROI |
<roi_label>.coords | Dictionary | Contains the bounding box coordinates that represent this ROI |
<roi_label>.current_objects | Array of dictionaries | Information about the objects currently in the ROIobject_tracking_id : Unique identifier for a specific object, as specified by object.id property (see Model Inference Node )allowed : Boolean. If the object's class is allowed or not to be within the ROI areafirst_seen : Time in seconds (since start of deployment) when the object was first seen in the ROIfirst_seen_utc : UTC time in ISO 8601 format when the object was first seen in the ROItime_present : Time in seconds that the object has been present in the ROI |
state | String | The state of the ROI can be either clear or alarm |
time_since_last_state_change | Float | The amount of seconds passed since the state changed |
type | String | OSHA compliance monitoring type |
change_threshold | Float | Amount of change above which an alarm will be triggered for an ROI |
change_score | Float | The change score obtained from the comparison between the reference image and current frame |
Updated 20 days ago