我在理解Viola Jones algorithm的训练阶段时遇到问题。
我用伪代码给出了算法,据我所知:

# learning phase of Viola Jones
foreach feature # these are the pattern, see figure 1, page 139
    # these features are moved over the entire 24x24 sample pictures
    foreach (x,y) so that the feature still matches the 24x24 sample picture
        # the features are scaled over the window from [(x,y) - (24,24)]
        foreach scaling of the feature
            # calc the best threshold for a single, scaled feature
            # for this, the feature is put over each sample image (all 24x24 in the paper)
            foreach positive_image
                thresh_pos[this positive image] := HaarFeatureCalc(position of the window, scaling, feature)
            foreach negative_image
                thresh_neg[this negative image] := HaarFeatureCalc(position of the window, scaling, feature)
            #### what's next?
            #### how do I use the thresholds (pos / neg)?

这是,顺便问一下这个问题中的框架:Viola-Jones' face detection claims 180k features
这个算法调用haarfeaturecalc函数,我想我已经理解了:
function: HaarFeatureCalc
    threshold := (sum of the pixel in the sample picture that are white in the feature pattern) -
        (sum of the pixel in the sample picture that are grey in the feature pattern)
    # this is calculated with the integral image, described in 2.1 of the paper
    return the threshold

到现在还有什么错误吗?
Viola Jones的学习阶段,基本上是检测哪些特征/检测器是最关键的我不明白adaboost是如何工作的,这在报纸上有描述。
问:论文中的AdaBoost在伪代码中是什么样子的?

最佳答案

维奥拉·琼斯:
首先你将硬编码180k分类器(恐惧)
最初所有的训练数据都有相同的权重
现在,每个分类器(特征)都将应用于您拥有的每个训练数据
每个功能都会将训练数据分类为面或非面
根据每个特征的分类,计算误差
在计算每个特征的误差后,选择误差最大的特征,与50%相差最远,我的意思是,如果一个特征误差为90%,另一个特征误差为20%,则选择误差为90%的特征,并将其添加到强分类程序中
你将更新每个训练数据的权重
现在,您将重复该过程,直到使用您构建的强分类器为您的验证数据获得很好的准确性
adaboost是一种用弱分类器构造强分类器的技术。

08-24 15:09