# How to prevent box overlapping Yolo v9

**URL:** <https://discuss.roboflow.com/t/how-to-prevent-box-overlapping-yolo-v9/7082>\
**Category:** 🤝  Community Help\
**Created:** [September 19, 2024, 4:39pm UTC](https://discuss.roboflow.com/t/how-to-prevent-box-overlapping-yolo-v9/7082 "2024-09-19T16:39:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Barcelos](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/igor_barcelos/32/3939_2.png) [@Igor\_Barcelos](https://discuss.roboflow.com/u/Igor_Barcelos)\
**Post date:** [September 19, 2024, 4:39pm UTC](https://discuss.roboflow.com/t/how-to-prevent-box-overlapping-yolo-v9/7082/1 "2024-09-19T16:39:23Z")

</div>

Hi everyone,

I’m currently working on a YOLOv9 model to detect stairs in architectural plans, and I’ve finally reached a point where the model is starting to deliver promising results, which feels fantastic!

However, in some cases, the model is generating overlapping bounding boxes, as shown below. I’ve tried adjusting the ‘iou’ parameter, but unfortunately, it hasn’t resolved the issue.

 ![0011- PLAN R+1 COLLECTIF A](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/d/db8962100462e99328e5e3dba374803755882ceb.jpeg)

Does anyone have suggestions on how I can improve this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Jacob\_Witt](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/jacob_witt/32/347_2.png) [@Jacob\_Witt](https://discuss.roboflow.com/u/Jacob_Witt)\
**Post date:** [September 19, 2024, 6:05pm UTC](https://discuss.roboflow.com/t/how-to-prevent-box-overlapping-yolo-v9/7082/2 "2024-09-19T18:05:10Z")

</div>

Hi @Igor_Barcelos - thanks for reaching out!

How many images is your model trained on? You may just need to add some more.

My other advice is using a piece of python code with the inference result that only takes the most confident prediction if two blocks are touching.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [September 30, 2024, 12:55pm UTC](https://discuss.roboflow.com/t/how-to-prevent-box-overlapping-yolo-v9/7082/3 "2024-09-30T12:55:44Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
