简体   繁体   English

理想的HoG功能数量

[英]Ideal number of HoG features

So there many options of how one can extract HoG features. 因此,有很多选项可以提取HoG功能。 Using different orientations, different numbers of pixels per cell and different block sizes. 使用不同的方向,每个单元的不同像素数和不同的块大小。

But is there a standard or optimal configuration? 但是有标准或最佳配置吗? I have training images of size 50x100, and I'm opting for 8 directions of orientation. 我有50x100大小的训练图像,我选择了8个方向。 I'm extracting the features from training data in order to do vehicle classification. 我正在从训练数据中提取特征以进行车辆分类。 But I really don't know what's "optimal". 但我真的不知道什么是“最佳”。

For example, I have 2 configurations here, is there any reason to choose one over the other? 例如,我在这里有2个配置,有没有理由选择其中一个? Personally I feel like the second one is a better choice, but why? 就个人而言,我觉得第二个是更好的选择,但为什么呢?

在此输入图像描述

在此输入图像描述

I used HOG for product recognition. 我用HOG进行产品识别。 From what I understood at the time, you are pointing to a real problem of the standard HOG. 根据我当时的理解,您指的是标准HOG的真正问题。 There is simply no optimal configuration, it depends on the dataset. 根本没有最佳配置,它取决于数据集。 If you have the optimal values for your dataset, and then resize all the pictures of your dataset, you should resize your values too. 如果您具有数据集的最佳值,然后调整数据集的所有图片大小,则还应调整值的大小。 Thus, there is no optimal "one size fits all" values for HOG. 因此,HOG没有最佳的“一刀切”值。

But all is not lost. 但一切都不会丢失。 What you should do instead is a method that works "all the time". 你应该做的是一种“一直”工作的方法。 The idea is to do Spatial Pyramid Matching . 我们的想法是进行空间金字塔匹配 This is just doing HOG at various scales and combining them together. 这只是在各种规模上做HOG并将它们组合在一起。 A picture being worth a thousand words : 一张价值千言万语的照片:

来自文章

You can see that here, level 2 is just the standard HOG with fine cells. 你可以看到,在这里,2级只是具有细胞的标准HOG。 But perhaps it is not the best scale (because the cells are too small and you just observe noise) (On the other hand, too large cells, like level 0, may be too large, and you will have uniform histograms everywhere). 但也许它不是最好的尺度(因为细胞太小而你只是观察到噪音)(另一方面,太大的细胞,如0级,可能太大,你会在任何地方都有统一的直方图)。 You can compute the best weights for each level when you do the training on your dataset, and you will know what are the optimal values, ie : what is the most relevant cell size 在对数据集进行训练时,您可以计算每个级别的最佳权重,并且您将知道什么是最佳值,即:最相关的单元格大小是多少

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

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