How to custom preprocess in SGIE base on Deepstream 5.0?

Check the function code and all the nvinfer is open sourced, you can refer DeepStream SDK FAQ and the nvinfer plugin manual Gst-nvinfer — DeepStream 6.3 Release documentation