Training a new LatentSVMDetector Models

295 Views Asked by At

I would like to train my own model to detect a different kind of object.

I don't mind do it in OpenCV or MatLab...

I already have prepared my positives and negatives samples ... How can I train my own model? Where can I found documentation about that?

I want to use this new model in http://www.cs.berkeley.edu/~rbg/latent/ (MatLab or OpenCV version).

THANK YOU in advance!!

1

There are 1 best solutions below

0
On

Its a fair question. Navigating your way through the world of OpenCV/Matlab can be quite challenging to say the least, particularly when it comes to training models.

The page you link to has a FAQ, that FAQ says:

Q: Can I train models with my own dataset?

A: It is possible to train models using your own dataset. I recommend taking a look at pascal_data.m, which defines the function that we use for loading the PASCAL data into the internal data structures used by our code. To support your own data, you will need to define your own function that reads in your positive and negative examples and returns the same data structures as the function pascal_data().

The code is also available on github, pascal_data.m is here and the pascal_data() function is near the top of the file.
So you'll need to create your own function similar to pascal_data() that returns the same type. Most of the method seems pretty straightforward, although to fully understand whats going on you might need a copy of the VOC2007 or VOC2010 data set.
Then take a look at pascal_train.m it looks like you should be able to replace the call to pascal_data() with your newly created function.
Then Matlab... sorry, I haven't gotten to this point yet, so can't provide any guidance in this area.