I have created a GStreamer plugin including “dlib” as a library. In my plugin, the detection part takes about 2s in that plug-in. However if I isolate the problem using a simple “dlib” + “opencv” program, that part is done in about 200ms. why?
Foe further debugging, please share steps of reproducing the issue on DeepStream SDK. Do you run nvgstiva-app?
Yes, I’m running nvgstiva-app, my steps are as follows:
First, I add my code in gstdsexample.cpp:
gst_dsexample_transform_ip (GstBaseTransform * btrans, GstBuffer * inbuf)
output = DsExample_DequeueOutput(dsexample->dsexamplelib_ctx, dsexample->cvmat);
Second, in the dsexample_lib folder, I add my code in dsexample_lib.c:
DsExample_DequeueOutput (DsExampleCtx *ctx, cv::Mat *input_mat)
DsExampleOutput *out = new (DsExampleOutput);
dlib_img = cv_image<bgr_pixel> (*input_mat);
std::vectordlib::rectangle faces = face_detector(dlib_img);
At last, I compiled the plug-in successfully, but the detection part is too slow, it takes about 2s in that plug-in
It looks to be hitting performance limitation. In running Deepstream SDK, there are multiple models running on GPU. dlib may also occupy GPU, making slow performance.
Please check the system status via tegrastats.