cv::cuda::CascadeClassifier OpenCV 3.2 using data trained in OpenCV 2.4.11

I have run the cuda version of cascade classifier in OpenCV 2.4.11 on cpu and a 860M GPU. The results can be wildly different in terms of being accurate. To a point where a detected object that was found in CPU has the same rectangle size on GPU version, but in a location way off. I need to know if anyone has experienced this. If you have. Did you retrain the classifier on that GPU?

I have tested my trained data(2.4.11) in OpenCV 2.4.11 gpu and cpu. I then was like well let me update the code base to use 3.2. Same, thing. Wildly different. Sometimes its correct sometimes it isn’t.

I’m using LPB and blasting full 1920x1080 images at it.

Hi,

This sounds like an OpenCV bug. I’d suggest you file a ticket with as much supporting evidence/code as possible to Issues · opencv/opencv · GitHub.

Best Regards.

I did some digging yesterday afterwards and found this:
https://github.com/opencv/opencv/issues/6693

Short summary: Something is wrong in cascade and its old. OpenCV appears to be giving up on it.

If I followed that thread correctly, it seems the CPU version of CascadeClassifier has been updated and diverged from the CUDA version, to the point that each has their own specific XML model… However, even using the correct XML model for a given HW you will not get the same results (CPU results are more accurate).

So if you have already tried the CUDA version of the XML model and the results are still not good enough, the only recourse would be to try and modify the code of the GPU version to make it perform the same. It does not appear that the folks involved with that thread plan to make the necessary changes… It’s unfortunate.

BTW, have you considered using a different detector? Something based on a DNN, like yolo for example?