1

我有一個問題,瞭解Viola Jones algorithm的訓練階段。維奧拉瓊斯學習階段/ AdaBoost

我給算法僞代碼,據我的理解:

# 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)? 

這,順便說一句框架在本SO問題: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 

到現在爲止有什麼錯誤嗎?

維奧拉瓊斯的學習階段,基本上檢測哪些功能/檢測器是最決定的。我不明白AdaBoost如何工作,這在文章中有描述。

問題:紙張上的AdaBoost如何看起來像僞代碼?

+0

在metaoptimize問ml相關的問題。對於這個問題適合更多:) – Fraz 2012-04-15 21:42:05

+0

我做了,http://metaoptimize.com/qa/questions/9931/learning-phase-of-viola-jones-adaboost – 2012-04-16 19:55:08

回答

0

維奧拉·瓊斯:

  • 首先你會硬編碼180K分類(feartures)
  • ,最初所有的訓練數據都會有相同的權重
  • 現在每個分類器(功能)將適用於每個訓練數據您都有
  • 每個功能都會將您的訓練數據分類爲臉部或不臉部
  • 根據每個功能的分類您將計算出錯誤
  • 在計算每個要素的誤差後,選擇具有最遠離50%的誤差的特徵,其中我的意思是,如果您有一個特徵的誤差爲90%,而其他特徵的誤差爲20%那麼你將選擇90%的誤差的功能,並把它添加到強classififer
  • 您將更新每個訓練數據
  • 現在,您將重複這個過程,直到你得到一個不錯的精度爲您驗證數據與強的權重分類器
  • AdaBoost是一種用弱分類器製作強分類器的技術