# How to get yolov5 bounding boxes (x, y, w, h) while using deepstream-app(deepstream6.1)

**URL:** <https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503>\
**Category:** DeepStream SDK\
**Tags:** deepstream61\
**Created:** [October 24, 2023, 9:06am UTC](https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503 "2023-10-24T09:06:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![1250576969](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@1250576969](https://forums.developer.nvidia.com/u/1250576969)\
**Post date:** [October 24, 2023, 9:06am UTC](https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503/1 "2023-10-24T09:06:58Z")

</div>

While using DeepStream 6.1 with the YOLOv5 neural network architecture, I’d like to know if it’s possible to synchronously output the bounding boxes (x, y, w, h) for each frame in the video stream.

---

<div class="post-metadata">

**Author:** ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)\
**Post date:** [October 24, 2023, 10:49am UTC](https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503/3 "2023-10-24T10:49:36Z")

</div>

You can refer to our source code:`opt\nvidia\deepstream\deepstream\sources\apps\sample_apps\deepstream-app\deepstream_app.c`.

```auto
static void
write_kitti_output (AppCtx * appCtx, NvDsBatchMeta * batch_meta){
...
      fprintf (bbox_params_dump_file,
          "%s 0.0 0 0.0 %f %f %f %f 0.0 0.0 0.0 0.0 0.0 0.0 0.0 %f\n",
          obj->obj_label, left, top, right, bottom, confidence);
...
}

```

---

<div class="post-metadata">

**Author:** ![1250576969](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@1250576969](https://forums.developer.nvidia.com/u/1250576969)\
**Post date:** [October 25, 2023, 5:04am UTC](https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503/4 "2023-10-25T05:04:42Z")

</div>

thanks for your reply.  
I’m confused that how can I use this function in my config.txt.  
If there a Deep Stream-wiki that I can refer to?

---

<div class="post-metadata">

**Author:** ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)\
**Post date:** [October 25, 2023, 5:50am UTC](https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503/5 "2023-10-25T05:50:22Z")

</div>

You can refer to the link below: [DS\_ref\_app\_deepstream](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_ref_app_deepstream.html). Because our deepstream-app demo is completely open source, it can be viewed together with the source code. `opt\nvidia\deepstream\deepstream\sources\apps\sample_apps\deepstream-app`

---

<div class="post-metadata">

**Author:** ![1250576969](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@1250576969](https://forums.developer.nvidia.com/u/1250576969)\
**Post date:** [October 25, 2023, 5:53am UTC](https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503/6 "2023-10-25T05:53:17Z")

</div>

Thanks，that’s what I need.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [November 8, 2023, 5:53am UTC](https://forums.developer.nvidia.com/t/how-to-get-yolov5-bounding-boxes-x-y-w-h-while-using-deepstream-app-deepstream6-1/270503/7 "2023-11-08T05:53:26Z")

</div>

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