opencv
opencv copied to clipboard
Move ML module to opencv_contrib
Describe the feature and motivation
After ~25 years of developing OpenCV and ~20 years of opencv_ml module history we found that it's time to move ML outside of the main repository. Here are the major reasons:
- ML module is not used in other parts of OpenCV, it's not used in any samples or tutorials, except for samples or tutorials about ML itself. Very few, if any, people from OpenCV community actually use it.
- Traditional ML has been completely replaced with Deep Learning in Computer Vision.
- Traditional ML, including decision trees, boosting (especially gradient boosting), support vector machines etc. is still actively used by scientific community, but there are high-quality packages that implement state-of-art approaches, most notable of which is scikit-learn. We don't see any strong reason and don't have any resources to compete with such packages.
So, we are going to move ML module to opencv_contrib together with tests, samples, docs/tutorials.
Additional context
No response
Consider that there are still people that want such stuff reachable from C++, so scikit-learn
is a great substitute for many users, but not all. I see no issues with the module being moved to contrib.
kmeans and PCA should be moved out of the core
module first (higher priority than touching of "standalone" ML module)
@opencv-alalek, moved where? kmeans is still quite actively used. PCA maybe less so, but it's quite fundamental thing that is still used, even with deep nets (it's the 'cheapest' auto-encoder)
ML module is a best candidate as target, but it's suggested to be removed.
another good place for kmeans and PCA is Features (former Features2D) module: #24999
Should this one be closed since PR is merged?
CI: https://github.com/opencv/ci-gha-workflow/pull/156