# Image segmentation using yolov8 with zed 2i python

**URL:** <https://community.stereolabs.com/t/image-segmentation-using-yolov8-with-zed-2i-python/3565>\
**Category:** Python\
**Created:** [September 25, 2023, 6:29am UTC](https://community.stereolabs.com/t/image-segmentation-using-yolov8-with-zed-2i-python/3565 "2023-09-25T06:29:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JPlou](https://community.stereolabs.com/user_avatar/community.stereolabs.com/jplou/32/1012_2.png) [@JPlou](https://community.stereolabs.com/u/JPlou)\
**Post date:** [September 25, 2023, 8:42am UTC](https://community.stereolabs.com/t/image-segmentation-using-yolov8-with-zed-2i-python/3565/2 "2023-09-25T08:42:33Z")

</div>

Hi @ash, welcome to the forums

I think you can only make the ZED SDK ingest bounding boxes and not masks, currently.  
So, it’s not really a display issue.

That being said, the masks in the BodyData are 2D arrays with values being either 0 (not mask) or 255 (mask). Their dimensions are the ones of the [`bounding_box_2d`](https://www.stereolabs.com/docs/api/python/classpyzed_1_1sl_1_1BodyData.html#a98fee4c31199a3cafe5528f49b19dad8) attribute. They are located in the frame following the `bounding_box_2d` origin.

You can use the tool you want to display it.  
@Gopi-htic used pyplot here for example: [Mask is inconsistent](https://community.stereolabs.com/t/mask-is-inconsistent/3454)

---

_[View the full topic](https://community.stereolabs.com/t/image-segmentation-using-yolov8-with-zed-2i-python/3565)._
