Hi,
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
netCV.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);
netCV.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);
for (;;)
{
vector<Mat> vMat_Outs;
//read frame
cap.read(matFrame);
// 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
sAIS_Status.AI.OpenCV.netCV.setInput(matBlob);
// 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.
}
Thanks,
Luis