[英]Combining multiple features vector, HOG and LBP
I am working on people detection using two feature descriptor, HOG and LBP. 我正在使用两个特征描述符HOG和LBP进行人员检测。 So far, I combine both of the features using a simple concatenation.
到目前为止,我已经使用简单的串联结合了这两个功能。 But it shows me sometimes problem due to big vectors.
但是它告诉我有时由于向量大而引起的问题。 Here is my code.
这是我的代码。
%extract features from negative and positive images
[HOGpos,HOGneg] = features(pathPos, pathNeg);
% loading and labeling each training example
HOG_featV = HOGfeature(fpos,fneg);
% get label of training data from HOG
HOGlabel = cell2mat(HOG_featV(2,:));
% get the feature vector value from HOG
HOGfeatureVector = HOG_featV(3,:)';
C = cell2mat(HOGfeatureVector); % each row of P correspond to a training example
%extract features from LBP
[LBPpos,LBPneg] = LBPfeatures(pathPos, pathNeg);
% loading and labeling each training example
LBP_featV = loadingV(LBPpos, LBPneg);
% get label of training data from LBP
LBPlabel = cell2mat(LBP_featV(2,:));
% get feature vector value from LBP
LBPfeatureVector = LBP_featV(3,:);
M = cell2mat(LBPtP)'; % each row of P correspond to a training example
%concatenate HOG and LBP feature
featureVector = [C M];
I want to know, is there any method to combine two feature vector which is more reliable and faster? 我想知道,是否有任何方法可以将两个特征向量结合起来,使其更可靠,更快? If yes, please give some suggestion or link that I can refer.
如果是,请提出一些建议或链接,我可以参考。 Thank you.
谢谢。
I understood from you comments the following: You are selecting 1845 key points in the image. 我从您的评论中了解到以下几点:您正在图像中选择1845个关键点。 For each point you calculate a feature vector of length 383 (LBP+HOG combined).
对于每个点,您将计算长度为383(LBP + HOG组合)的特征向量。 The total vector that represents the image is of length ~100,000.
表示图像的总向量长度约为100,000。
If in fact you have only 1845 images and each image is represented by only 383 features than you are doomed to fail and your SVM will have a very high error rate. 如果实际上您只有1845张图像,并且每个图像仅由383个特征表示,那么您注定要失败,并且SVM的错误率将非常高。 Mainly because (the features vector is too short and the amount of training images is too small).
主要是因为(特征向量太短并且训练图像的数量太小)。 So I assume that is not the case
所以我认为情况并非如此
You have a few problems in your approach. 您的方法存在一些问题。
Practical advise: 实用建议:
You can keep working with LBP/HOG features but first make sure you have a huge amount of 'non people' examples (1-10 millions) Otherwise you will have a high error rate. 您可以继续使用LBP / HOG功能,但是首先请确保您有大量的“非人”示例(1-10百万),否则您的错误率就会很高。 Try to get also few thousands images of people
尝试获取数千人的图像
Train a single cascade detector. 训练单个级联检测器。 It is easier to understand, much faster and is more accurate than SVM.
与SVM相比,它更易于理解,更快,更准确。 Give the training process all possible HOG, LBP features (without histograms) and let it select the good features.
为训练过程提供所有可能的HOG,LBP特征(无直方图),并让其选择良好的特征。 There are free implementations of cascade detector training inside openCV which you can use.
您可以使用openCV中的级联检测器培训的免费实现。 My personal advise: do not use SVM for detection.
我的个人建议:请勿使用SVM进行检测。 It is a wrong tool.
这是一个错误的工具。 Once you detected a person in the image you can use SVM to classify if it is an adult or a kid but do not use SVM for detection.
一旦在图像中检测到人,就可以使用SVM对其进行分类,是成人还是孩子,但不要使用SVM进行检测。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.