Blocks description

Blocks description

Session

This is the basic block that defines a session. It is a kind of loop that in each iteration takes a frame from the Stream, applies the Inferencing engine to it, and returns the received Predictions.

INPUTS:

Inferencing - an inference engine from a specified detection or classification model block.

OUTPUT:

Predictions - recognitions containing object categories, their coordinates, number, and information about the frame in which they occurred.

Model

Model trained in ONESTEP AI and ready to perform inference on it. There are two types of Models: detection and classification.

OUTPUT:

Inferencing - the inference engine of a given model.

Prediction trigger

A block responsible for filtering Predictions received from a Session, processing them, and possibly creating a Prediction Event if the conditions specified by the parameters are met.

There are seven Prediction triggers:

  • Categories relation trigger - an object of class X was found above/below/inside/outside an object of class Y.

  • Quantity trigger - there were exactly/more than/less than X representatives of class Y.

  • Size trigger - the object of class X has size (height x width) exactly/more than/less than YxZ.

  • Location trigger - the object of class X was inside/outside the region of interest (ROI).

  • Speed trigger - the object of class X covered Y % of the area in a time shorter/longer than Z.

  • Category transform trigger - transformation of the class representation of the object from X to Y (for example, we have the classes STANDING-HUMAN and LYING-HUMAN, and the object changes from one state to another).

  • Line crossing trigger - an object of class X has crossed a predefined line in one of two directions.

INPUT:

Predictions - a list of recognitions coming from the Session.

OUTPUT:

Predictions event - an event consisting of correlated Predictions, a timestamp, and possibly other metadata that may be relevant to the post-processing of the algorithm.

Aggregator

A block that groups (aggregates) Events derived from Prediction triggers.

INPUT:

Prediction event - a specific event related to the predictions coming from the Session.

OUTPUT:

Aggregate - an aggregate that combines all input Events.

Aggregation trigger

Trigger that operates on aggregated Events. It analyzes the relationship between Prediction events with consideration of time. There are four Aggregation triggers:

  • Events quantity trigger - there were exactly/more than/less than X Predictions events of type Y.

  • Time between events trigger - between Predictions events of type X occurred exactly/more than/less than Y time.

  • Time interval trigger - an event that occurs unconditionally once every specified amount of time (does not apply to any Prediction events).

  • Events sequence trigger - an event that occurs when a specific sequence of Prediction events defined here has occurred previously.

INPUT:

Aggregate - grouped (aggregated) Events.

OUTPUT:

Aggregation event - a new Event consisting of correlated Prediction events and Prediction.

Action

This is a block that defines the reaction of the algorithm when a prediction or aggregation Event has occurred. Depending on which Event is connected to it, the corresponding variables resulting from the metadata of this Event will be available in event variables.

There are the four Actions:

  • Send HTTP request action - send an HTTP request of GET/POST type with possible additional parameters.

  • Send e-mail action - send an e-mail with specified content to a given address.

  • Send SMS action - send SMS with specified content to a given number.

  • Make screenshot action - save a screenshot from the stream after the event occurs.

INPUT:

Predictions event - A prediction event originating from a Prediction Trigger.

Aggregation event - An aggregation event originating from an Aggregation Trigger.

Relations between blocks

  • The basic and necessary block for creating an algorithm is the Session. To each Session we need to connect exactly one Model.
  • If a Prediction trigger is connected to a Session, the algorithm remains a draft until we connect the Action or Aggregator block itself to it, along with the Aggregation trigger and Action.
  • Multiple Prediction triggers can be connected to one Session, but each Prediction trigger is connected to only one Session.
  • Multiple Prediction triggers can be connected to one Aggregator and vice versa.
  • Multiple Aggregation triggers can be connected to one Aggregator, but each Aggregation trigger is connected to only one Aggregator.
  • Prediction trigger and Aggregation trigger can be connected to multiple Actions, but each Action has exactly one Trigger connected to it.