# Bounding Box Level Augmentation for Segmentations/Polygon dataset?

**URL:** <https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248>\
**Category:** 🤝  Community Help\
**Created:** [September 18, 2023, 9:27am UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248 "2023-09-18T09:27:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrblake213](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mrblake213/32/2877_2.png) [@mrblake213](https://discuss.roboflow.com/u/mrblake213)\
**Post date:** [September 18, 2023, 9:27am UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248/1 "2023-09-18T09:27:03Z")

</div>

Is it possible to use the bounding box level augmentations for polygon datasets for instance segmentation?

---

<div class="post-metadata">

**Author:** ![Lenny](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/lenny/32/2383_2.png) [@Lenny](https://discuss.roboflow.com/u/Lenny)\
**Post date:** [September 18, 2023, 9:29am UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248/2 "2023-09-18T09:29:24Z")

</div>

Yes, it is possible to use bounding box level augmentations for polygon datasets for instance segmentation. Roboflow has introduced a new augmentation technique called bounding box level augmentation, which is not available anywhere else [source](https://blog.roboflow.com/introducing-bounding-box-level-augmentations/).

However, if you have a dataset annotated with bounding boxes and want to convert them into instance segmentation annotation labels, you can use the SAM tutorial and notebook provided by Roboflow [source](https://blog.roboflow.com/polygon-vs-bounding-box-computer-vision-annotation/).

For converting bounding boxes to polygons, you can use the `supervision.mask_to_xyxy` utility or import detections into supervision and export from the mask property [source](https://blog.roboflow.com/convert-bboxes-masks-polygons/).

Remember, polygons can always be converted back to bounding boxes, but bounding boxes cannot be as easily converted into polygons [source](https://blog.roboflow.com/polygons-object-detection/).

If you already have a dataset annotated with bounding boxes and want to convert it into an instance segmentation dataset, you can use SAM standalone because the model can process existing bounding boxes [source](https://blog.roboflow.com/enhance-image-annotation-with-grounding-dino-and-sam/).

For labeling, Roboflow Annotate now offers automated polygon labeling for all users [source](https://blog.roboflow.com/automated-polygon-labeling-computer-vision/).

Please note that the quality and quantity of the dataset have a significant impact on the performance of object detection models. High-quality annotations, with accurate object boundaries and precise labeling, play a crucial role in effectively training the model [source](https://blog.roboflow.com/polygon-vs-bounding-box-computer-vision-annotation/).

* * *

> Hi! I’m Roboflow’s AI powered bot. This is an automated response powered using AI with knowledge from our docs, blog, knowledge base, and previous forum responses. If you find this to be a helpful answer, please mark it as the solution using the checkbox icon below. If this doesn’t solve your issue, please follow up with what you’ve tried/why, and the community will continue to chime in as usual.

---

<div class="post-metadata">

**Author:** ![mrblake213](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mrblake213/32/2877_2.png) [@mrblake213](https://discuss.roboflow.com/u/mrblake213)\
**Post date:** [September 18, 2023, 9:33am UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248/3 "2023-09-18T09:33:15Z")

</div>

Here is the result after applying a 20% crop - bounding box level augmentation:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/c/c527d6da20572623a7644803c4681cfafc729954.jpeg)

Why did the object become black?

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [September 18, 2023, 11:43am UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248/4 "2023-09-18T11:43:08Z")

</div>

Hi @mrblake213

Sorry to hear you’re having issues with generating your dataset. Could you please share either the Universe link or workspace/project ID so we can take a deeper look?

---

<div class="post-metadata">

**Author:** ![mrblake213](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mrblake213/32/2877_2.png) [@mrblake213](https://discuss.roboflow.com/u/mrblake213)\
**Post date:** [September 18, 2023, 12:19pm UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248/5 "2023-09-18T12:19:14Z")

</div>

Hi!  
Here it is: [Street Litter Instance Segmentation Dataset by Street Litter](https://universe.roboflow.com/street-litter/street-litter)  
I just generated the latest version and looked at the images.  
There are still images of where the objects became black.

---

<div class="post-metadata">

**Author:** ![mrblake213](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mrblake213/32/2877_2.png) [@mrblake213](https://discuss.roboflow.com/u/mrblake213)\
**Post date:** [September 20, 2023, 1:22am UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248/6 "2023-09-20T01:22:49Z")

</div>

Hi! Any updates?

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [September 29, 2023, 8:18pm UTC](https://discuss.roboflow.com/t/bounding-box-level-augmentation-for-segmentations-polygon-dataset/3248/7 "2023-09-29T20:18:24Z")

</div>

Hi @mrblake213,

Sorry for the delayed response. Could you try regenerating the version? It’s possible this issue was fixed.
