Skip to content

Object Presence Change

The Object Presence Change query type works by detecting transitions in object presence within a specified region and time window. The user can define a time window (e.g., 10 seconds), an object type (e.g., person, car), and a Region of Interest (ROI).

Within the selected time window, the system analyzes whether there is a change in the presence of the specified object type. For example, if no person is detected during the first half of the window but one appears in the second half, the system registers a detection with an "appeared" attribute. Similarly, if an object disappears, it is marked as "disappeared".

By aggregating multiple such detections within the configured time window, the overall accuracy improves significantly - the longer the time window, the more frames are analysed. This type of query is ideal for use cases where some latency is acceptable: a common example is monitoring parking areas — the departure and arrival of cars (or even airplanes) can be detected with high precision.

Prerequisites


Setup

  1. Select a video from your workspace Click +Set up New Query.
  2. Select Object Presence Change from the list of query types.

1. Query Name

Give your query a name to better identify it. A description can also be added (optional).

2. Object Detection Filter

Videos

The thumbnail image of the previously chosen video is displayed here.

Time interval

Time interval

Select a time frame for the analytics to run, depending on the type of video selected above:

  • Earliest: Run the query from the time shown (set during video registration as the beginning timestamp of the video).
  • Latest: Run the query until the time shown (set during video registration as the end timestamp of the video).
  • Given Date: You can select a custom start and end date and time to run the query on. Type the desired date and time or select them by clicking the calendar icon.
  • Live: Analysis is run live, continuously.
  • Interval: You can select a custom start and end date and time to run the query on. Type the desired date and time or select them by clicking the calendar icon.
  • Set interval to: Choose from the presets below to run the query on a given time interval.

Object types

Select one or multiple object types you want to search for - Person is selected by default. Select a category, then click the dropdown menu to see the list of available object types for the selected object category.

Object types

  • Minimum confidence (0.5 by default): The minimum confidence level required for an object to be detected. The higher the confidence level, the more certain the system is that the object is of the selected type. The confidence level ranges from 0 to 1, with 1 being the highest confidence level.

ROI (Region of Interest)

ROI

Draw a polygon on the video frame to define the area where the objects will be detected. The polygon can be drawn by clicking on the video frame to create points, then clicking the first point to close the polygon.

Note that currently only one ROI can be drawn.

3. Object Presence Change

  • Time window length (in milliseconds, 2000 by default): The time window during which the presence of the object is monitored. The system checks for changes in object presence within this time frame, and compares the first half of the window with the second half. If an object appears in the second half that was not present in the first half, it is marked as "appeared". If an object disappears, it is marked as "disappeared".

  • Threshold (0.5 by default): The minimum confidence level required for an object to be considered present in the scene. Adjusting this value can help filter out false positives, ensuring that only objects with a confidence level above the threshold are considered for presence change detection.

All done - Clicking Save & Run will immediately start the analysis and opens the Result screen of this query. Alternatively, clicking Save & Exit saves the query without running it.

4. Alarm Integration (optional)

Payload type is DetectionSet with a presenceChange string attribute indicating the direction of change: appear or disappear.

Example:

{
   "detections":[
      {
         "video_id":"05497d88-488e-4731-a96e-7aaffa9d63e7",
         "frame_time":1750769005784,
         "track_id":460,
         "frame_width":1920,
         "frame_height":1080,
         "obj_type":"person",
         "box":{
            "x":1204,
            "y":381,
            "width":182,
            "height":483
         },
         "confidence":0.9482422,
         "attributes":[
            {
               "name":"presenceChange",
               "type":"string",
               "value":"disappear"
            }
         ],
      }
   ],
}