简体   繁体   English

如何将LibSVM用于多个描述符进行图像分类-Matlab

[英]How to use LibSVM for multiple descriptors for image classification - Matlab

I need to classify pairs of image and indicate whether they're the same of not. 我需要对图像进行分类,并指出它们是否相同。 I use several descriptors as SIFT LBP and more. 我将几个描述符用作SIFT LBP等。 I want now to use LIBSVM to do the training and test. 我现在想使用LIBSVM进行培训和测试。 how can I use teh svmTrain. 如何使用svmTrain。 should I save only the distance between 2 descriptors and then just have 1 1:SIftDelta, 2:LBPDelta 我应该只保存2个描述符之间的距离,然后只有1个1:SIftDelta,2:LBPDelta

is this the correct way or is there any better approach? 这是正确的方法还是有更好的方法? thanks 谢谢

I'm not sure this is the right forum for this question, as it deals more with "high level" notions of learning, rather the specific implementation of it in Matlab. 我不确定这是否是该问题的合适论坛,因为它更多地涉及“高级”学习概念,而不是在Matlab中的具体实现。

Having said that, it seems like you are trying to combine multiple cues for learning, which is not a trivial task. 话虽如此,看来您正在尝试结合多种线索进行学习,这并不是一件容易的事。

I can propose two methods for you: 我可以为您提出两种方法:

  1. Direct method - just concatenate all your descriptors into a single, very long, one and do the learning in this high dimensional space. 直接方法-只需将所有描述符连接成一个非常长的描述符,然后在这个高维空间中进行学习。

  2. Do the learning in two stages (consequently, you'll have to partition your training data into two): 分两个阶段进行学习(因此,您必须将训练数据分成两个部分):

At the first stage, learn K classifiers, each using a different descriptor (assuming you wish to use K different descriptors). 在第一个阶段,学习K分类器,每个分类器使用不同的描述符(假设您希望使用K不同的描述符)。

Then, at the second stage, (using the reminder of your training data), you classify each example using the K classifiers you have: this will give you a new K -dimensional feature vector for each sample (you can put the classification result, or use the distance from the separating hyper plane to populate the k -th entry in the new descriptor). 然后,在第二阶段(使用训练数据提醒),使用您拥有的K分类器对每个示例进行分类:这将为每个样本提供一个新的 K维特征向量(您可以输入分类结果,或使用与分隔超平面的距离来填充新描述符中的第k个条目。 Now you can train a second classifier on the new K -dimension vectors. 现在,您可以在新的K维向量上训练第二个分类器。 This second classifier gives you the final output of your multi-descriptor system. 第二个分类器为您提供多描述符系统的最终输出。

-Enjoy! -请享用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM