Ask Your Question

yvshashoua's profile - activity

2015-06-24 20:13:45 -0600 commented question How do I save and upload a random forest once I have trained it?

What I mean is that when I am loading a classifier that I already trained and saved, using the load function returns a CvMLData, but using predict requires a CvMat instead. I have tried all kinds of ways of getting this to work, but nothing works.

2015-06-23 05:15:26 -0600 commented question How do I save and upload a random forest once I have trained it?

It baffles me that there is easy, clear sample code in the OpenCV textbook for training and testing a random forest classifier, but there is nothing for just loading a trained classifier and using it, which should be even easier to do. I have gone through the letter recognition example, but they are rewriting the entire read .csv function. There must be an easy way to do it.

2015-06-22 20:47:40 -0600 commented question How do I save and upload a random forest once I have trained it?

Yes, I am using load() and save(), but how do I use the CvMLData that I get when I load the classifier? I am looking for code that does the job. I have the code to train it and then test it, but I don't see any method for using it for test data once I have loaded a pre-trained model. I have tried to use predict, but it is expecting something else besides a CvMLData.

2015-06-20 23:53:48 -0600 asked a question How do I save and upload a random forest once I have trained it?

I used OpenCV code to train a random forest classifier. But I cannot find any documentation on how to save and upload it to use. I don't want to have to retrain it each time. Does anyone have the code for doing this?