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

PropertyDescriptionTypeDefaultRequired
roi_labelsComma separated list of labels for each ROI in the rois listhiddennulltrue
roisRegions of interest. References roi_labels for keyspolygonnulltrue
osha_compliance_typeOSHA 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
enumpathwayfalse
objects_allowedObject classes that will bypass the alarm when present in the ROIsmodel-labelpersonfalse
change_thresholdAmount 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%slider1.5true
alarm_buffer_secondsTime for which an obstruction should be detected to trigger an alarmnumber10false
reference_image_modeUpdate 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
enumstream_snapshotfalse
reference_update_intervalWhen set to 0, load reference frame only in deployment initialization. Otherwise refresh every N seconds subject to the mode above, if no alarm is triggerednumber0false
reference_update_triggerTrigger the reference image update subject using the mode above, when this condition evaluates to truetrigger-conditionnullfalse
tracking_modeThe point to be used as tracking point. Options:
- centroid
- top-center
- bottom-center
- left-center
- right-center
- all
enumcentroidfalse
display_roiDisplay ROI on video. Options:
- detailed
- simplified
- none
enumdetailedfalse
display_objectsDisplay objects on videoboolfalsefalse
display_debug_infoDisplay debugging infoboolfalsefalse

Metadata

Metadata PropertyDescription
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

KeyTypeDescription
clear_rois_countIntegerNumber of ROIs that are not triggering any alarm
clear_rois_deltaIntegerDifference of clear ROIs between last frame and this frame
descriptionString
exception_alarm_rois_countIntegerNumber of ROIs that are triggering an alarm
exception_alarm_rois_deltaIntegerDifference of the number of ROIs creating alarm between last frame and this frame
exception_alarm_rois_idsListThe IDs of the ROIs that are generating an exception alarm
exception_allowed_rois_countIntegerNumber of ROIs that are bypassing an alarm because there's an allowed object within the ROI area
exception_allowed_rois_deltaIntegerDifference of the number of ROIs bypassing alarm between last frame and this frame
exception_allowed_rois_idsListThe IDs of the ROIs that are bypassing an exception alarm
monitoring_typeStringOSHA compliance monitoring type
reference_image_updatedBooleanSet as True in the frame the reference image is updated
<roi_label>Array of dictionariesContains information about this specific ROI
<roi_label>.coordsDictionaryContains the bounding box coordinates that represent this ROI
<roi_label>.current_objectsArray of dictionariesInformation about the objects currently in the ROI

object_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 area

first_seen : Time in seconds (since start of deployment) when the object was first seen in the ROI

first_seen_utc : UTC time in ISO 8601 format when the object was first seen in the ROI

time_present : Time in seconds that the object has been present in the ROI
stateStringThe state of the ROI can be either clear or alarm
time_since_last_state_changeFloatThe amount of seconds passed since the state changed
typeStringOSHA compliance monitoring type
change_thresholdFloatAmount of change above which an alarm will be triggered for an ROI
change_scoreFloatThe change score obtained from the comparison between the reference image and current frame