How can I filter detections by PolygonZone in Roboflow supervision

35 views Asked by At

I have an intelligence created by a roboflow notebook and I run it from my web camera but I want the detections to be only in a polygonal area and not in the entire camera. they say I can do it with

import supervision as sv
zone = sv.PolygonZone(...)
detections = sv.Detections(...)
mask = zone.trigger(detections=detections)
detections = detections[mask]

Could you give me an example of how to fill it out

0

There are 0 answers