Input masks and ROI

The inclusion and exclusion areas add a mask over the image that is 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 results that are within the designated polygon will be returned in the results.

Inclusion area showing a polygon mask drawn over the camera image
Inclusion results showing only detections inside the polygon area

In practice the results will overlap the borders of the polygon a little bit because the middle of the bottom of the detection box is taken as the anchor location for the detected object.

circle-info

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 same works for the exclusion area - here only objects that have the anchor location outside of the area will be returned.

Exclusion area showing a polygon mask drawn over the camera image
Exclusion results showing only detections outside the polygon area

Region of Interest (ROI)

The region of interest defines a square region of the image that will be sent to the AI Manager - the parts outside of the region will not be seen by the model.

ROI area showing a rectangle selection on the camera image
ROI results showing only the region inside the rectangle processed by the model

This also means that the image can not be another shape than a rectangle, and you may need to change the model resizing method to letterbox for the models to work correctly.

Model resizing method setting in the plugin configuration
circle-exclamation

Custom external processing

If this behavior is not the desired behavior, is possible to create your own preprocessor to create a mask or postprocessor to exclude results from an area that you designate.

For more information on custom preprocessors and postprocessors you can checkout the examples in our GitHub repository

Last updated