Skip to main content

Rule Type

A rule is a set of conditions that defines and triggers an event of the AI Task. To create a rule:

  • Click the + button
  • Select rule type from the Rule Type drop-down list

Each rule type comes with dedicated parameters for futher configuration

Presence rule

Use this rule to detect and track object(s) present in the image.

  1. The Every Detection will trigger an event in every frame it detects the object.

  1. The Object Appearing will trigger only one event when the object first appears. It will only trigger once more when the object disappears and appears again.

  1. The Object Disappearing will trigger an event when the object disappears from ROI. This event will contain 3 images of the object: its first appearance, its last appearance, and when it dissapears from sight

  1. The Duration will trigger an event when the object is maintained in ROI within the duration limit. The same ID will not be triggered again unless it disappears first.

Path rule

Use this rule to detect object travelling over a specific path defined by a Start ROI and End ROI.

In addition, you can configure the rule to generate an event only if the total amount of time the object moves from Start to End ROI is within the duration limit.

Boundary Crossing rule

Use this rule to detect the objects (its center point) crossing through a defined boundary.

  1. The Trigger When option will only trigger an event each time X objects cross the boundary.

  2. The Global Start Value represents the initial number of objects already present before the counting begins. It is added to the live count of objects that cross the defined boundary.

Example: If you’re counting the total number of people in a building:
Total People = Global Start Value (people already inside) + People detected crossing the boundary
This ensures the system reflects the accurate total from the beginning, not just those counted in real time.

  1. Due to variations in camera angles, an object’s bounding box may fluctuate in size, causing its calculated center point to shift unexpectedly. This can lead to false or unstable detections.
    The LastPointsToConsider parameter helps address this issue by storing the center points of up to the last 5 detected frames. The system then computes the average of these center points, resulting in smoother and more stable bounding boxes. This averaging process reduces jitter and significantly improves detection accuracy.

Static Count rule

Use this rule to trigger an event based on the number of objects in the image.

In addition, you can set the following parameters to define counting condition

Density mode: Switch from counting mode to measuring the coverage of object's bounding boxes in the image

Limit: Generate event when the count value is within a specific limit and duration

Time Repeat Trigger: How often you want to repeat trigger (within the limit if enabled)

Value Repeat Trigger: Only repeat trigger if the count change more than X value (can only be disabled when enable limit)

caution

If both Time Repeat Trigger AND Value Repeat Trigger are enabled, then the event must pass both settings to be valid

Inclusive rule

Use this rule to trigger event when the inclusive object(s) is within the boundary of the main object(s).

With the inclusive rule, the event is triggered depending on the space relativity between the main object (from object list) and inclusive objects.

  1. Press + button to add inclusive objects
  2. Press View Inclusive Items to preview the space relativity (ROI) between main objects and inclusive objects in the image
  3. Mode:
    1. Proportion: the space relativity between the main object and the inclusive object must be proportional (as you draw) in every size
    2. Absolute: the space relativity between the main object and the inclusive object must be the exact same as you draw.
  4. Trigger Option:
    1. Every Detection: The event is generated every time the inclusive object is within the boundary of the main object.
    2. When at least X inclusive objects are found: The event is generated when a specific number of inclusive objects is found within the boundary of the main object.
    3. Every time inclusive data changes: The event is generated only when the number of inclusive objects changes.
Entry/Exit rule

Use this rule to count the objects crossing through each Entry ROI or Exit ROI.

This rule keeps separate counts for each object type and maintains independent counts for entries and exits, updating them with every crossing.

  1. You can add up to 3 entry ROIs and 3 exit ROIs

  2. The Global Start Value represents the initial number of objects already present before the counting begins. It is added to the live count of objects that cross the entry ROIs.

Example: If you’re counting the total number of people entering and exiting building:
Total People = Global Start Value (people already entry) + People detected crossing the entry ROIs + People detected crossing the exit ROIs
This ensures the system reflects the accurate total from the beginning, not just those counted in real time.

Static Object Duration

Use this rule to detect and track a static object(s) present in the image.

Duration Limit(s):The duration (seconds) that the system will analyze from the moment it detects the object. This number of seconds will then be converted into the equivalent number of frames (based on the camera FPS)

Threshold: The minimum ratio between total frames with object detected vs the total frames. When the actual ratio is greater than or equal to the minimum ratio, the system will trigger an event

Reset Time(s): The time (in seconds) to stop sending next event

Example: Fire Detection
  • If the camera is 10 FPS and the duration limit is 8 seconds. Then, the total frames will be 8s x 10FPS = 80 frames. This means that from the moment fire/smoke detected, the system will continue to analyze for an additional 80 frames before making a conclusion.
  • Threshold = 40%, meaning that if there are at least 80 frame * 40% = 32 frames with fire detected, the system will trigger an event