I’m brand new to OF and come from CS more than art but has anyone looked into a ML or AI addon to do basic regression/classification training and prediction? I have some experience with it and decent C++. I think it could be pretty useful… Maybe it’s already in the works? Any interest?
Haven’t heard a of addon for that yet.
But seems that OpenCV 2.0 have this feature? Maybe we can integrate that into the existing ofxOpenCv?
OpenCV does have a lot of good ML/AI algorithms in it. It’d be great to see more of them wrapped. http://opencv.willowgarage.com/documentation/cpp/ml.-machine-learning.html
More than wrapping, what would be really helpful is examples. I think a bigger issue than not having access to the algorithms is just people not knowing what you can do with them!
[quote author=“JacksonM”]I’m brand new to OF and come from CS more than art but has anyone looked into a ML or AI addon to do basic regression/classification training and prediction? I have some experience with it and decent C++. I think it could be pretty useful… Maybe it’s already in the works? Any interest?
I think there definitely would be of interest - do you think you could explain further what your imagining? Would it be something general or a set of tools tailored to specific problems?
I’m not sure yet. I just saw all the ML stuff in openCV 2.0 and that looks like more than enough, but it would be nice to wrap it up. I like OF a lot because it’s so user friendly and you don’t need to know anything about openGl to do graphics. I’d like to have the same thing for some ML stuff. I need to look into what openCV has to offer and get back to you, but I was planning on something generic. Do you know how much of openCV is in the lib provided in OF. (i.e. is the ML stuff already in there?)
I did some work wrapping the k-means clustering for clustering colors and ofPoints http://code.google.com/p/kyle/source/browse/trunk/openframeworks/addons/ofxKmeans/src/ofxKmeans.h (this isn’t really usable right now) but afaik there aren’t any other OpenCV ML algorithms currently wrapped into OF addons.
I’d like to wrap SVMs because I think they’re really powerful, but it’s such a balancing act between:
What has been you stance on wrapping other APIs for OF? Do you remove a lot of functionality for simplicity? It seems like that is the idea behind openframeworks. Especially for topics as complicated as SVMs.
Something like this would be easy to wrap into OF
Some of the NN stuff might be nice, but there’s other libraries for that too though. Boosting might be really handy for people doing recognition tasks too.
Though the ofxPatterns library is really simple it is a way to get started with pattern recognition and the examples are easy to read through.
I don’t think it’s necessarily about removing functionality for simplicity. I think it’s more about considering a problem that people might run into, and making it easy for them to solve it.
For example, with the contour finder in ofxOpenCv, it’s pretty straightforward: sometimes people want contours from an image. We want them in a basic form that we can manipulate (something object oriented, ideally) rather than the very C-style approach of OpenCV. We don’t want to worry about allocating or deallocating memory. My idea about wrapping an API for OF looks like this:
- a constructor with no arguments
- a setup() function that initializes the algorithm behind the class, and allocates any necessary memory, with most arguments set to some reasonable default but tweakable if necessary
- some setter/getter methods for setting things that can be changed online
- a few methods for using the algorithm in different ways (like with k-means: sometimes you want to cluster colors in an image, sometimes you want to cluster a vector of ofPoints, or ofColors, etc.)
- if the algorithm has complex output, don’t return it from the function called above but instead use multiple getter methods to return the various components
- a destructor that cleans everything up
Has this been taken further?