No detection result from the detectNet when cloned from the jetson-inference repo

I am using a real-live stream for the inference. The mechanism is, decode the received h264 using SW (as the jetson nx board h264_cuvid not working). Then I got the YUV420p data and converted it to BGR_NV21 and pushed it for the faceNet face detection. But the result is nothing!!! It even does not throw any error!!!.

The code follows -

openCVConvertYUVtoBGRNV21(src, dest, width, height);
len = width * height * 3;

printf(“RGB conversion done.\n”);
// CUDA conversion on images to GPU
//input
uchar3 d_in;
// malloc memo in gpu
cudaMalloc((void
*)&d_in, len * sizeof(uchar3));
//copy image from cpu to gpu
cudaMemcpy(d_in, dest, len * sizeof(uchar3), cudaMemcpyHostToDevice);

// detect objects in the frame
detectNet::Detection* detections = NULL;

printf(“Overlay flag: %d\n”, overlayFlags); // it is 7
const int numDetections = net->Detect(d_in, width, height, &detections, overlayFlags);