OpenCVの顔検出過程を可視化した動画

NegativeMind
4 min readJun 23, 2014

--

OpenCVの顔検出器の検出過程を可視化した動画。

http://vimeo.com/12774628

ここで使われているアルゴリズムはViola-Jones法。この手法による顔検出のポイントは、以下の2つのステップ。

  • 前処理:大量の学習データを用いたAdaBoostによる識別器の学習
  • 高速な検出処理:Haar-Like特徴量を用いたCascade構造の識別器で画像中を高速全探索

弱い識別器を連結したCascade型の識別器でザルのように順に画像を選別していく。
弱い識別器の集合で強い識別器を作る方法は、集団学習とかアンサンブル学習とか言われる。



この動画では、赤い枠で走査して、枠内のピクセルをCascadeに通過させて識別している様子が可視化されている。
もともとこの動画は、一般的な顔認識で検知されないようにするためのメイク & ヘアスタイル『CV Dazzle』の解説の一部らしい。

This video visualizes the detection process of OpenCV’s face detector.
The algorithm uses the Viola Jones method of calculating the integral image and then performing some calculations on all the areas defined by the black and white rectangles to analyze the differences between the dark and light regions of a face.
The sub-window (in red) is scanned across the image at various scales to detect if there is a potential face within the window. If not, it continues scanning.
If it passes all stages in the cascade file, it is marked with a red rectangle. But this does not yet confirm a face. In the post-processing stage all the potential faces are checked for overlaps.
Typically, 2 or 3 overlapping rectangles are required to confirm a face. Loner rectangles are rejected as false-positives.
This visualization was done as part of the documentation for CV Dazzle, camouflage from face detection.
For more information, visit cvdazzle.com

http://japanese.engadget.com/2011/03/17/cv-dazzle/

参考:コンピュータビジョンのセカイ — 今そこにあるミライ
http://news.mynavi.jp/series/computer_vision/010/
http://news.mynavi.jp/series/computer_vision/011/

2014/08/20追記:

【動画】Adaboostによる顔検出アルゴリズムの様子がよくわかるCUDAのデモ

Originally published at NegativeMindException.

--

--