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

Move ML module to opencv_contrib #24997

Closed
Tracked by #25007
vpisarev opened this issue Feb 12, 2024 · 7 comments
Closed
Tracked by #25007

Move ML module to opencv_contrib #24997

vpisarev opened this issue Feb 12, 2024 · 7 comments
Assignees
Labels
category: ml cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) feature
Milestone

Comments

@vpisarev
Copy link
Contributor

vpisarev commented Feb 12, 2024

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 vpisarev added feature cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) labels Feb 12, 2024
@vpisarev vpisarev added this to the 5.0 milestone Feb 12, 2024
@crackwitz
Copy link
Contributor

crackwitz commented Feb 12, 2024

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.

@vpisarev vpisarev mentioned this issue Feb 12, 2024
11 tasks
@opencv-alalek
Copy link
Contributor

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

@vpisarev
Copy link
Contributor Author

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

@opencv-alalek
Copy link
Contributor

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

@vpisarev
Copy link
Contributor Author

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

@kaingwade kaingwade self-assigned this Feb 21, 2024
@kaingwade kaingwade moved this to In Progress in OpenCV 5.0 Feb 21, 2024
asmorkalov pushed a commit that referenced this issue Feb 27, 2024
Move ml to opencv_contrib #25017
OpenCV cleanup: #24997

opencv_contrib: opencv/opencv_contrib#3636
@kaingwade kaingwade moved this from In Progress to Done in OpenCV 5.0 Feb 28, 2024
@fengyuentau
Copy link
Member

Should this one be closed since PR is merged?

@asmorkalov
Copy link
Contributor

CI: opencv/ci-gha-workflow#156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: ml cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) feature
Projects
Status: Done
Development

No branches or pull requests

6 participants