Closed neilenns closed 4 years ago
This shouldn't be too bad to do since the predictions already include the bounding rect.
Extend the trigger
config to include masks
, an array of mask objects: xMinimum
, yMinimum
, xMaximum
, yMaximum
.
Then it's just an if (predictions.some((prediction) => masks.some((mask) => mask.overlaps(prediction))) { skip it };
The DeepStack API returns a bounding box for the detected object. If the object is one that's supposed to trigger (based on class), there should be an optional secondary check on whether the rectangle intersects at all with a list of defined exclusion zones in the trigger's configuration.
This will enable blocking out parts of an image that are prone to false positives.