what is OpenCV 3.2 machine learning implementation status?

asked 2017-02-28 10:06:26 -0600

Gediminas gravatar image

updated 2017-03-01 07:20:50 -0600

I am trying to upgrade OpenCV libraries on our software from 2.4 to 3.2, but from what I have encountered up until now it seems it's still under heavy development.

With decision trees I straight away got a crash as member cv_labels vector of DTreesImpl class was not initialized, but in calculation it is used as initialized. I used a solution proposed in this comment to proceed further:

https://github.com/opencv/opencv/issu...

void DTreesImpl::startTraining( const Ptr<TrainData>& data, int )
{

...

    else
        data->getResponses().copyTo(w->ord_responses);

    // ---- new code ----
    const int n_cv = params.getCVFolds();
    if ( n_cv > 0 ) {
        int nsamples = (int) w->cat_responses.size();
        w->cv_labels.resize( nsamples );
        randu( w->cv_labels, 0, n_cv );
    }
}

Then I noticed that different decision tree is being generated than what used to be. Tracking it down I noticed that current implementation does not prune trees at all:

int maxdepth = INT_MAX;//pruneCV(root);

Parameter set by setTruncatePrunedTree is not used as well.

Besides I find some node information being hidden from public access in the API but this is minor.

Now I haven't gone too deep further and I haven't tried looking into implementation of other statistical models if there are similar problems, but my question is: Does anybody know what actual state is with machine learning module? Is it still experimental? Is anybody working on it at the moment, because this crash problem exists already 2 years and was not fixed with latest OpenCV release?

edit retag flag offensive close merge delete