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

PropertyValue
roi_labelsComma separated list of labels for each ROI in the rois list above.

Format: label1, label2

Ex: queue_entrance, queue_store
roisSemicolon separated list of areas in the video within which the node tracks these objects.

If none is specified, the Queue Length Counter tracks objects within the entire frame.

Format: left1,top1,right1,bottom1; left2,top2,right2,bottom2

Ex: 10,10,100,100; 200,200,300,300
osha_compliance_typeOSHA compliance monitoring type.

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)
objects_allowedComma separated list of Detected Object labels to track, as specified in Model Labels

ex. car, person

Objects classes that will bypass the alarm when present in the ROIs.
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

Ex. 1.5
alarm_buffer_secondsNumber of seconds for which an obstruction should be detected to trigger an alarm

Ex. 10
reference_update_intervalWhen set as 0 the reference frame is just loaded in deployment initialization, else updated every X seconds if no alarm is triggered.

Ex. 0
tracking_modeThe point to be used as tracking point, refers to the position on the object's bounding box.

centroid
top-center
bottom-center
left-center
right-center
all
display_roiBoolean. If true, ROI info will be drawn on video.

Ex. true / false
display_objectsBoolean. If true, the object's info is drawn on video.

Ex. true / false
display_debug_infoBoolean. If true, debugging information will be drawn on video for troubleshooting.

Ex. true / false

Metadata

Metadata PropertyDescription
nodes.<node_id><node_id> for the Scene Change Detection is of the form scene_change_detectionX (ex. scene_change_detection1)

Format : 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