# Preprocess objects before SGIE inference

**URL:** <https://forums.developer.nvidia.com/t/preprocess-objects-before-sgie-inference/280790>\
**Category:** DeepStream SDK\
**Created:** [January 31, 2024, 12:22pm UTC](https://forums.developer.nvidia.com/t/preprocess-objects-before-sgie-inference/280790 "2024-01-31T12:22:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tvai](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tvai](https://forums.developer.nvidia.com/u/tvai)\
**Post date:** [January 31, 2024, 12:22pm UTC](https://forums.developer.nvidia.com/t/preprocess-objects-before-sgie-inference/280790/1 "2024-01-31T12:22:18Z")

</div>

**• DeepStream Version** : 6.4

Hi,

I’d like to preprocess detected object in a SGIE.  
I want to modify each objects detected by a PGIE (doing some transformation via CUDA or OpenCV or CV-CUDA), but I don’t want to modify the original frame.  
I succeed to do it modifying the original frame, but I’d like to create the buffers for SGIE input layer without modifying the frame.  
I’m using C++.  
I’m investigating nvdspreprocess, but not sure it can do what I want.

Thanks

---

<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:** [February 2, 2024, 5:16am UTC](https://forums.developer.nvidia.com/t/preprocess-objects-before-sgie-inference/280790/3 "2024-02-02T05:16:44Z")

</div>

Yes, it can. You can refer to our source code demo:`sources\apps\sample_apps\deepstream-preprocess-test`.

---

<div class="post-metadata">

**Author:** ![tvai](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tvai](https://forums.developer.nvidia.com/u/tvai)\
**Post date:** [February 13, 2024, 10:58am UTC](https://forums.developer.nvidia.com/t/preprocess-objects-before-sgie-inference/280790/4 "2024-02-13T10:58:43Z")

</div>

Thanks @yuweiw, I did it with nvdspreprocess and it’s working fine.

---

<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:** [February 27, 2024, 10:59am UTC](https://forums.developer.nvidia.com/t/preprocess-objects-before-sgie-inference/280790/5 "2024-02-27T10:59:40Z")

</div>

Closed on February 27, 2024, 10:59am UTC

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