opencv icon indicating copy to clipboard operation
opencv copied to clipboard

Move ML module to opencv_contrib

Open vpisarev opened this issue 1 year ago • 5 comments

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

vpisarev avatar Feb 12 '24 12:02 vpisarev

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.

crackwitz avatar Feb 12 '24 15:02 crackwitz

kmeans and PCA should be moved out of the core module first (higher priority than touching of "standalone" ML module)

opencv-alalek avatar Feb 12 '24 18:02 opencv-alalek

@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)

vpisarev avatar Feb 12 '24 20:02 vpisarev

ML module is a best candidate as target, but it's suggested to be removed.

opencv-alalek avatar Feb 12 '24 22:02 opencv-alalek

another good place for kmeans and PCA is Features (former Features2D) module: #24999

vpisarev avatar Feb 13 '24 01:02 vpisarev

Should this one be closed since PR is merged?

fengyuentau avatar Feb 28 '24 14:02 fengyuentau

CI: https://github.com/opencv/ci-gha-workflow/pull/156

asmorkalov avatar Feb 28 '24 15:02 asmorkalov