Multi-Dimensional Data for SVM

2 vues (au cours des 30 derniers jours)
Zbigniew
Zbigniew le 3 Mai 2011
Hello,
I hope this is the right place to ask a question like this.
I would like to compare two classes of images: yellow flower and non-yellow flower using the libSVM package. I don't think I can use the built-in SVM package that comes with Matlab because it doesn't support multi-dimensional data, which is what I need I think.
What I would like to do is compare feature points (SURF or SIFT) and other things like colour histogram, etc. per image. For the training of the SVM, libSVM needs two matrices: a 'label' vector like this:
[1 % yellow flower image
1
-1 % non-yellow flower image
-1];
and the data vector like this:
[feature points for img1 (MxN), colour histogram information (RGB space, 1x3), other information about img1
feature points for img2, etc....
feature points for img3, etc....
feature points for img4, etc.... ]
where each row corresponds to one image ('1' or '-1' in the 'label' vector above). The data is multi-dimensional because there are multiple feature points for each image. I don't think my design works because the number of feature points is different for each image :/ some images have 130+ salient feature points and some have less so the size of the final multi-dimensional row is different for each image.
Can anyone help me with this problem? How else can I design my data for this to work and avoid my problem? Maybe I can use the built-in Matlab package if I shift my data around in some way?
I'm sorry if this is not the right place to ask a question like this. libSVM does not have a forum of its own and this problem is, I guess, more about data design than the libsvm package itself.
Many thanks for any help received,
Ziggy

Réponses (2)

Richard Willey
Richard Willey le 3 Mai 2011
Hi Ziggy
First: Statistics Toolbox has a number of good classification algorithms. The 11a release includes a variety of different boosted decision trees including adaboost - this is a very popular classification algorithm within the image processing field.
Second: From the sounds of things, your problem isn't with the classification algorithm, but rather with what's called "feature extraction". How can you transform your image into raw data that the classification algorithm can work with.
MathWorks gave a webinar a couple weeks back titled "Computer Vision with MATLAB" which included an applied feature extraction / classification example.

Zbigniew
Zbigniew le 5 Mai 2011
Hi Richard,
Thanks for your response.
Re: 1) None of those algorithms (I think) support multi-dimensional data. From the brief searching that I have done, some versions of adaboost do but I'm not sure if Matlab supports these ones. I will read into this a bit more. Techniques exist to remove multi-dimensionality of data but information is lost in the process. I would like to avoid this as much as possible.
Re: 2) It's imperative in my case that I use the feature extraction technique I mentioned above. I found a few solutions to my problem from other sources. Because each image returns a different number of feature points one needs to combine this information to produce something of the same size. For others that may come across my dilemma:
- one solution is to use a bag of features technique. Have a histogram of bags (no. of bags is constant for each image) and store information about the histogram instead of the feature points themselves.
- another is to use what's suggested in "Recognition with Local Features: the Kernel Recipe" by C. Wallraven, B. Caputo and A. Graf, ICCV 2003. From what I understand, you place your data into some kernel, cross-product it with the transpose of this kernel and the size of the result will always be the same no matter how many feature points you detect.
- you can use other averaging techniques, e.g. PCA. (not too certain about this but someone did suggest it).
I'm not sure which technique will work best for my scenario but I'll find out hopefully soon enough.
The webinar you suggested was very informational.
Ziggy

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by