parent
4e71bf0a9b
commit
2d7fe2babc
|
@ -13,7 +13,7 @@ published: true
|
||||||
|
|
||||||
[原文连接]<http://www.willberger.org/cascade-haar-explained/>
|
[原文连接]<http://www.willberger.org/cascade-haar-explained/>
|
||||||
|
|
||||||
“Alright! This is where we start having some fun! The concept behind the Haar Cascade and how it is used in the real world is nothing short of amazing. So what is it?”
|
“Alright! This is where we start having some fun! The concept behind the Haar Cascade and how it is used in the real world is nothing short of amazing. So what is it?”
|
||||||
|
|
||||||
Haar 级联分类器的背后思想以及其现实应用实在令人倍感惊奇。
|
Haar 级联分类器的背后思想以及其现实应用实在令人倍感惊奇。
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ Haar 级联分类器是一种机器学习算法,最初由 Paul Viola 和 Micha
|
||||||
“The algorithm has four stages:
|
“The algorithm has four stages:
|
||||||
|
|
||||||
1. Haar[1] Feature Selection
|
1. Haar[1] Feature Selection
|
||||||
2. Creating Integral Images[2]
|
2. Creating Integral Images[2]
|
||||||
3. Adaboost[3] Training
|
3. Adaboost[3] Training
|
||||||
4. Cascading Classifiers“
|
4. Cascading Classifiers“
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ Haar 级联分类器最著名的应用是检测图像中的人脸或身体,但
|
||||||
|
|
||||||
本文以人脸检测为例。首先需要大量包含人脸的 positive image 和不包含人脸的 negative image 来训练分类器。然后我们从其中提取特征。
|
本文以人脸检测为例。首先需要大量包含人脸的 positive image 和不包含人脸的 negative image 来训练分类器。然后我们从其中提取特征。
|
||||||
|
|
||||||
“First step is to collect the Haar Features. A Haar feature considers adjacent rectangular regions at a specific location in a detection window, sums up the pixel intensities in each region and calculates the difference between these sums. ”
|
“First step is to collect the Haar Features. A Haar feature considers adjacent rectangular regions at a specific location in a detection window, sums up the pixel intensities in each region and calculates the difference between these sums.”
|
||||||
|
|
||||||
第一步是收集 Haar 特征。可以将 Haar 特征看作检测窗口中相邻的举行区域,将各自区域的像素强度加合,然后计算它们的差值。
|
第一步是收集 Haar 特征。可以将 Haar 特征看作检测窗口中相邻的举行区域,将各自区域的像素强度加合,然后计算它们的差值。
|
||||||
|
|
||||||
|
@ -59,17 +59,17 @@ Haar 级联分类器最著名的应用是检测图像中的人脸或身体,但
|
||||||
|
|
||||||
可以使用积分图加快这一运算过程。
|
可以使用积分图加快这一运算过程。
|
||||||
|
|
||||||
“But among all these features we calculated, most of them are irrelevant. For example, consider the image below. Top row shows two good features. The first feature selected seems to focus on the property that the region of the eyes is often darker than the region of the nose and cheeks. The second feature selected relies on the property that the eyes are darker than the bridge of the nose. But the same windows applying on cheeks or any other place is irrelevant. ”
|
“But among all these features we calculated, most of them are irrelevant. For example, consider the image below. Top row shows two good features. The first feature selected seems to focus on the property that the region of the eyes is often darker than the region of the nose and cheeks. The second feature selected relies on the property that the eyes are darker than the bridge of the nose. But the same windows applying on cheeks or any other place is irrelevant.”
|
||||||
|
|
||||||
但是,这些特征中的很大一部分是与任务目标不相关的(没有意义的特征)。以下图为例,应用第一行的选择窗口可以得到两个好的特征:选取第一个特征,主要是由于眼部区域通常比鼻子和脸颊更黑;选取第二个特征则依赖于眼部比鼻梁更黑这一现象。但是,将同样的检测窗口应用于脸颊或其他部位则得不到有意义的特征。
|
但是,这些特征中的很大一部分是与任务目标不相关的(没有意义的特征)。以下图为例,应用第一行的选择窗口可以得到两个好的特征:选取第一个特征,主要是由于眼部区域通常比鼻子和脸颊更黑;选取第二个特征则依赖于眼部比鼻梁更黑这一现象。但是,将同样的检测窗口应用于脸颊或其他部位则得不到有意义的特征。
|
||||||
|
|
||||||
![Integral Images](/img/Deep_Learning_Haar_Cascade_Explained/002.png)
|
![Integral Images](/img/Deep_Learning_Haar_Cascade_Explained/002.png)
|
||||||
|
|
||||||
“So how do we select the best features out of 160000+ features? This is accomplished using a concept called Adaboost which both selects the best features and trains the classifiers that use them. This algorithm constructs a “strong” classifier as a linear combination of weighted simple “weak” classifiers. The process is as follows.”
|
“So how do we select the best features out of 160000+ features? This is accomplished using a concept called Adaboost which both selects the best features and trains the classifiers that use them. This algorithm constructs a “strong” classifier as a linear combination of weighted simple “weak” classifiers. The process is as follows.”
|
||||||
|
|
||||||
在人脸检测这样的任务中,特征总数足有 160000 多个,如何从中选取最有意义的特征?这由 Adaboost 算法完成,该算法会选取最佳特征并训练分类器来使用这些特征。Adaboost 算法引入了强分类器和弱分类器的概念,强分类器由弱分类器线性组合而成。其算法过程如下:
|
在人脸检测这样的任务中,特征总数足有 160000 多个,如何从中选取最有意义的特征?这由 Adaboost 算法完成,该算法会选取最佳特征并训练分类器来使用这些特征。Adaboost 算法引入了强分类器和弱分类器的概念,强分类器由弱分类器线性组合而成。其算法过程如下:
|
||||||
|
|
||||||
“During the detection phase, a window of the target size is moved over the input image, and for each subsection of the image and Haar features are calculated. You can see this in action in the video below. This difference is then compared to a learned threshold that separates non-objects from objects. Because each Haar feature is only a "weak classifier" (its detection quality is slightly better than random guessing) a large number of Haar features are necessary to describe an object with sufficient accuracy and are therefore organized into cascade classifiers to form a strong classifier.”
|
“During the detection phase, a window of the target size is moved over the input image, and for each subsection of the image and Haar features are calculated. You can see this in action in the video below. This difference is then compared to a learned threshold that separates non-objects from objects. Because each Haar feature is only a "weak classifier" (its detection quality is slightly better than random guessing) a large number of Haar features are necessary to describe an object with sufficient accuracy and are therefore organized into cascade classifiers to form a strong classifier.”
|
||||||
|
|
||||||
## 标注
|
## 标注
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ Haar 级联分类器最著名的应用是检测图像中的人脸或身体,但
|
||||||
|
|
||||||
[2] Integral Images
|
[2] Integral Images
|
||||||
|
|
||||||
“An integral image is summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a rectangular subset of a grid. To understand this look at image 1 and image 2. Image 1 is the source table, Image 2 is the summation table. Notice in Image 2 row 1, col 2 value 33 is sum of Image 1 row 1 (col 1 + col 2).“
|
“An integral image is summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a rectangular subset of a grid. To understand this look at image 1 and image 2. Image 1 is the source table, Image 2 is the summation table. Notice in Image 2 row 1, col 2 value 33 is sum of Image 1 row 1 (col 1 + col 2).“
|
||||||
|
|
||||||
![Integral Images](./img/Deep_Learning_Haar_Cascade_Explained/004.png)
|
![Integral Images](./img/Deep_Learning_Haar_Cascade_Explained/004.png)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue