OpenCV4.5.1 / Darknet / forward problem (Always the same result)


I’m having a problem with object detection using a yolov4 tiny custom model and OpenCV4.5.1. I don’t know if this is the best place to ask this question but here it goes…

When i run the forward pass to get output of the output layers, the first frames i get the output boxes correctly but after a while, always return the same output boxes, it looks like it gets stuck.

This happends with Jetson Xavier Nx but with the Jetson Nano works flawlessly.

Has anyone encountered this symptom?

  • Jetpack 4.5.1
  • OpenCV 4.5.1
  • Darknet
  • Yolov4 tiny model

Example (Just an example):

  //Set Model
  netCV= readNetFromDarknet (sModel_Config_Path, sModel_Weights_Path);
  //Set CUDA
  for (;;)
      vector<Mat> vMat_Outs;
      //read frame;

      // Create a 4D blob from a frame.
      matBlob= blobFromImage(matFrame, 1 / 255.0, cv::Size(iMatAnalysis_Width, iMatAnalysis_Height), Scalar(0, 0, 0), true, false);
      //Sets the input to the network	
      // Runs the forward pass to get output of the output layers
      netCV.forward (vMat_Outs, get_OutputsNames(netCV));

     //->  The "vMat_Outs" result is always the same, but the Mat frame is always different.



Below is the source code of the test (Any model can be used to test it):

Detections start to malfunction when i use the system command to send a command to the operating system in a separate thread.



Do you use the same software on Jetson Nano?
More, is the malfunction in the second comment can also be duplicated on a Nano board?



Yes it’s exactly the same software.
No the malfunction in the second comment cannot be duplicated in Jetson Nano, only in Jetson Xavier Nx…

On Jetson Nano the software works well.

The Jetson Nano and Jetson Xavier Nx have the Jetpack 4.5.1.

There is a difference, on Jetson Nano i’m using a modified version of Jetpack 4.5.1,

I replaced the:
CUDA for the version 10.0.326
CuDNN for the version

The Jetson Xavier Nx has the original Jetpack versions.


There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.


Could you also replace the CUDA and cuDNN version for XaiverNX and test it again?
We want to clarify this is a hardware issue or cuDNN issue first.


Hi AastaLLL,

I should have closed the post, I abandoned the problem because it only happens on Jetson Xavier Nx and I’m going to use a jetson Nano for the project. Sorry.

Thanks for the help,