For the complete documentation index, see llms.txt. This page is also available as Markdown.

Input masks and ROI

Use inclusion, exclusion, and ROI masks to limit what the AI Manager sees.

Inclusion and exclusion areas add a mask over the image sent to the AI Manager. The Region of Interest (ROI) removes all information outside the designated region and sends only the information inside the rectangle to the AI Manager.

Inclusion Area Mask

For the inclusion area, only results within the designated polygon are returned.

Inclusion area showing a polygon mask drawn over the camera image
Inclusion area: a polygon mask limits results to inside the shape
Inclusion results showing only detections inside the polygon area
Inclusion results: only detections inside the polygon are returned

In practice, results overlap the polygon borders slightly because the anchor location for a detected object is the middle of the bottom of the detection box.

The center of the bottom of the bounding box is chosen for the anchor location because that is usually a good indication for where a person or object is standing on the ground. In a line-crossing scenario for example, this would make it easier to detect if a person crosses a certain line.

Exclusion Area Mask

The exclusion area works the same way: only objects with the anchor location outside the area are returned.

Exclusion area showing a polygon mask drawn over the camera image
Exclusion area: a polygon mask limits results to outside the shape
Exclusion results showing only detections outside the polygon area
Exclusion results: only detections outside the polygon are returned

Region of Interest (ROI)

The region of interest defines a square region of the image sent to the AI Manager; the model does not see the parts outside the region.

ROI area showing a rectangle selection on the camera image
ROI area: a rectangle defines the region sent to the AI Manager
ROI results showing only the region inside the rectangle processed by the model
ROI results: only the region inside the rectangle is processed

This also means the image must be a rectangle; set the model resizing method to letterbox for the models to work correctly.

Model resizing method setting in the plugin configuration
Set the model resizing method to letterbox when using ROI

Custom External Processing

To customize this behavior, create a preprocessor to build a mask, or a postprocessor to exclude results from a designated area.

For examples of custom preprocessors and postprocessors, see the sclbl-integration-sdk repository:

Sclbl Integration SDK

Last updated