Add a preprocessing into pipeline that have 2 models

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)**GPU
• DeepStream Version5.0
• JetPack Version (valid for Jetson only)
• TensorRT Version7.1.3
**• NVIDIA GPU Driver Version (valid for GPU only)**10.2
Hi
I’m running face recognition. At the second model, i need to transpose copped image then feed it. I inserted gstdsexample between face detection model and face embedding model. however it seems incorrect. this is code to build pipeline

and this is code i modified in gstdsexample.cpp


in the second model, it dont take copped image at dsexample->cvmat?

How can i add a preprocessing in pipeline correctly?

inter_buf is temporarily used inside dsexample which will never be transferred to downstream. It is not a proper way to do preprocessing outside nvinfer.

thanks for repyling, so how can i do a preprocessing in my pipeline? i use Deepstream 5.0

nvinfer is open source. And the supported input and output is:
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream%20Plugins%20Development%20Guide/deepstream_plugin_details.html#wwpID0E0ZEB0HA

Any other things, you need to add pre-processing inside nvinfer by yourself.

it mean i need to add pre-processing inside nvinfer, but which file do i need to change?

It is necessary to review and understand the whole codes for nvinfer first. The plugin codes are in /opt/nvidia/deepstream/deepstream-5.0/sources/gst-plugins/gst-nvinfer and /opt/nvidia/deepstream/deepstream-5.0/sources/libs/nvdsinfer. And then you can judge whether it is suitable to add this kind of pre-processing in it.

[quote=“Fiona.Chen, post:7, topic:153797”]
And then you can judge whether it is suitable
thanks for your suggest, i will come back if the issue was solved.

hey @phuong1998bn,have you solve this problem?