I am doing a custom preprocessing algorithm on the cropped images before SGIE which is face alignment. Therefore, I decided to follow the dsexample to get the Image from GPU(using get_converted_mat, NvBufSurfaceSyncForCpu …) and have done that. After the face alignment, I have 112*112 Opencv Mat and want to transfer it to GPU for replacing the origin cropped Image in order to pass it through a TensorRT ArcFace model.
How can I do that? Please give me a hint!
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU):GPU • DeepStream Version:5.0 • JetPack Version (valid for Jetson only) • TensorRT Version:7.0 • NVIDIA GPU Driver Version (valid for GPU only):440
We did a trick to walk around the problem of doing preprocessing on GPU by using dsexample plugin. More details, you can look at our repos:
The idea is doing face alignment on CPU than change the boxes in object_metas to the boxes on the top of the frame. After getting the output from Secondary nvinfer, we return back the actual boxes to the object_metas