简体   繁体   English

有关OpenCV的HoG和CvSVM的更多问题

[英]More questions about OpenCV's HoG and CvSVM

I've managed to extract HoG features from positive and negative images (from INRIA's person dataset ) using OpenCV's HOGDescriptor::compute function. 我已经使用OpenCV的HOGDescriptor :: compute函数从正图像和负图像(来自INRIA的人员数据集)中提取了HoG功能。

I've also managed to pack the data correctly and feed it into CvSVM for training purposes. 我还设法正确打包数据并将其馈送到CvSVM中以进行培训。

I have several questions: 我有几个问题:

  • While extracting features, I used positive images with dimension of 96 x 128, while the negative images are on average 320 x 240. I have been using window size of 64 x 128 for HoG extraction, should I use other window size ? 提取特征时,我使用正尺寸为96 x 128的正图像,而负图像的平均尺寸为320 x240。我一直在使用64 x 128的窗口大小进行HoG提取,是否应该使用其他窗口大小?

  • The size of extracted features for positive images are around 28800 features, while the negative ones are around 500000+. 正图像的特征提取大小约为28800个特征,负图像的特征提取约为500000+个特征。 I have been truncating the features from negative ones to 28800, I think this is wrong, since I believe I'm losing too much information when feeding these features to SVM. 我一直在将功能从否定的功能截断到28800,我认为这是错误的,因为我认为将这些功能提供给SVM时会丢失太多信息。 How should I go and tackle this ? 我应该如何解决呢? (It seems like I can only feed the same sample size for negative and positive features) (似乎我只能为负图和正图提供相同的样本量)

  • While doing prediction on images bigger than 64 x 128 (or 96 x 160), should I use a sliding window to do prediction ? 在对大于64 x 128(或96 x 160)的图像进行预测时,是否应该使用滑动窗口进行预测? Since large negative images still gives me more than 500000 features, but I can't feed it into SVM due to sample size. 由于较大的负片图像仍然为我提供了超过500000个功能,但是由于样本量太大,我无法将其馈入SVM。

Why you can't just resize all your patches to the same size? 为什么不能仅仅将所有补丁调整为相同大小? Hog descriptor depends on windows size, blocks and cells sizes. 猪描述符取决于窗口大小,块和单元格大小。 You should try different combinations. 您应该尝试不同的组合。 With small cells you can capture small details, but you will lose in generality and vice versa. 使用小单元格,您可以捕获小细节,但总体上会迷失方向,反之亦然。 1.) Don't understand the question 2.) Make all descriptors the same size, extracting hog from resized images. 1.)不理解问题。2.)使所有描述符的大小相同,从调整大小后的图像中提取猪。 3.) Don't understand the question 3.)不明白这个问题

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

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