Object Detection example drawing 2D mask over image

I’m working with a Jetson NX and I want to have live time object detection using my Zed Mini. I have the examples and tutorials working, but I can’t find any example using the mask as seen in the object detection documentation. I was wondering if anyone could direct be to a 2D example using opencv and a mask instead of a bounding box over the object.

1 Like

Hi @ChealsieBains01,

There is unfortunately no example on our github showing how to draw the 2D mask over a detected object yet, but we’ll log your request and will add an example online as soon as possible.
In the meantime, I attached a small python script showing you how it can be done in Python.

For information, in the C++ sample, you can change L.99 to true to draw the 2D mask over detected objects. This can also help you understand how it works.

Hope this helps !

ZED_Mask.py (5.5 KB)

1 Like