# Preprocessing image before feed it in SGIE

**URL:** <https://forums.developer.nvidia.com/t/preprocessing-image-before-feed-it-in-sgie/154404>\
**Category:** DeepStream SDK\
**Created:** [September 15, 2020, 9:28am UTC](https://forums.developer.nvidia.com/t/preprocessing-image-before-feed-it-in-sgie/154404 "2020-09-15T09:28:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuong1998bn](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@phuong1998bn](https://forums.developer.nvidia.com/u/phuong1998bn)\
**Post date:** [September 15, 2020, 9:28am UTC](https://forums.developer.nvidia.com/t/preprocessing-image-before-feed-it-in-sgie/154404/1 "2020-09-15T09:28:24Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)**  
**• DeepStream Version**  
**• JetPack Version (valid for Jetson only)**  
**• TensorRT Version**  
**• NVIDIA GPU Driver Version (valid for GPU only)**  
Hi,  
I am working on a pipeline which face detection as primary inference and generate face feature vector as secondary inference. Before the secondary inference, I have a face landmark detector which is added to user-meta-data. I want to align the faces using these landmarks points to feed the sgie.  
Presently I am achieving this by changing the(custom plugin dsexample) blur-objects function to align-objects where I change the ROI of faces(in\_mat) to aligned faces. But in this case, the original frames are distorted.  
Is there a way to define some function which preprocesses the in\_mat for the sgie before feeding it.  
Any help will be appreciated.

thanks.

this is older topic from [DeepStream SDK - NVIDIA Developer Forums](https://forums.developer.nvidia.com/c/accelerated-computing/intelligent-video-analytics/deepstream-sdk/15) . Hower, dont have answer yet,

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [September 17, 2020, 2:52pm UTC](https://forums.developer.nvidia.com/t/preprocessing-image-before-feed-it-in-sgie/154404/3 "2020-09-17T14:52:24Z")

</div>

**There is no update from you for a period, assuming this is not an issue any more.  
Hence we are closing this topic. If need further support, please open a new one.  
Thanks**

> [@phuong1998bn](#):
>
> Is there a way to define some function which preprocesses the in\_mat for the sgie before feeding it.

Sorry! Don’t understand your requirement, What do you mean “define some function”? Why do you think this can solve your issue?

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:16pm UTC](https://forums.developer.nvidia.com/t/preprocessing-image-before-feed-it-in-sgie/154404/5 "2021-10-12T16:16:32Z")

</div>

Closed on October 12, 2021, 4:16pm UTC


