Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA CascadeClassifier no longer available #2048

Closed
xsacha opened this issue Mar 19, 2019 · 14 comments
Closed

CUDA CascadeClassifier no longer available #2048

xsacha opened this issue Mar 19, 2019 · 14 comments

Comments

@xsacha
Copy link

xsacha commented Mar 19, 2019

This PR (#1889) removed objdetect related classes such as cv::cuda::CascadeClassifier. For me, the best part about OpenCV (recently moved to contrib).

The pull request states it is obsolete. If so, what is the replacement? I have not seen anything similar. Please do not suggest DNN as it is far slower and not equivalent at all.

I am still unable to use OpenCV 4.X due to this PR.

@xsacha xsacha changed the title Objdetect no longer available CUDA CascadeClassifier no longer available Mar 19, 2019
@Ayke
Copy link

Ayke commented May 29, 2019

+1. Does anyone know any workaround for this?

@xsacha
Copy link
Author

xsacha commented May 29, 2019

Does not look like they care about CUDA support anymore. You will have to move on I feel. I already have.

@Ayke
Copy link

Ayke commented May 30, 2019

Does not look like they care about CUDA support anymore. You will have to move on I feel. I already have.

Me too. Have installed OpenCV 3.4, it works fine with CUDA 10.0.

@c-x-berger
Copy link

c-x-berger commented Jun 19, 2019

Yikes. Can confirm this is still the case for... some reason.

Why this was removed I have no idea, since the PR is nondescript about it. If @alalek would be more specific about what was legacy needing removal I'd happily try to patch, but the removed stuff doesn't mention cvLoad, which was apparently what was supposed to be removed? Is Open CV dropping Cascade Classifiers entirely going forward? What's the deal?

You could maybe get away with using the HOG detector? That's still included in 4.1.0. But seeing as the DNN module is slow for you I'm guessing the same applies. (Also, the CUDA HOG detectMultiScale needs a CV_WRAP, so it's not available from Python.)

@06needhamt
Copy link

Are the CPU bound cascade classifiers going to be dropped eventually, as I am planning on using them in the near future?

@xsacha
Copy link
Author

xsacha commented Oct 27, 2019

Probably not as it is easier to maintain

@06needhamt
Copy link

Are there any plans to re-add the CUDA classifiers with the new APIs?

@alalek
Copy link
Member

alalek commented Oct 28, 2019

There are no resources planned for that.
Feel free to prepare patch with migration of disabled code from removed legacy API and validate proposed changes.

@Raffaello
Copy link

@alalek shouldn't be deprecated and replace with the new one before disabling it?

@xsacha
Copy link
Author

xsacha commented Mar 20, 2020

There is no new one unless someone added one recently

@nosajthenitram
Copy link
Contributor

I know this thread is dated at bit at this time, but I've started the effort of getting openCV 4.3.0 to work with cuda cascade classifiers. I have it functioning against simple classifiers, so there's still a little more work to do. I'll push this up to a branch on my work when it's in better shape.

@06needhamt
Copy link

Sounds great. Keep us updated on your progress. As I am keen to upgrade to OpenCV 4 but not having CUDA accelerated classifiers is a key blocker.

@nosajthenitram
Copy link
Contributor

I've pushed up my first branch with the fix for CUDA cascade classifiers in OpenCV4.x.

https://github.com/nosajthenitram/opencv_contrib/tree/2048_cuda_cascade_no_longer_available

@nosajthenitram
Copy link
Contributor

@alalek Who maintains the xml parser for the persistence module? I've got some questions regarding the cuda cascade classifier xml and how it's consumed. I'm not an xml expert, so I'm not sure what this should look like as it's represented in the file nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants