diff --git a/Algorithm/AI/Deep_Learning_Haar_Cascade_Explained.md b/Algorithm/AI/Deep_Learning_Haar_Cascade_Explained.md index 8e6ad47..f75637c 100755 --- a/Algorithm/AI/Deep_Learning_Haar_Cascade_Explained.md +++ b/Algorithm/AI/Deep_Learning_Haar_Cascade_Explained.md @@ -25,6 +25,33 @@ Haar 级联分类器是一种机器学习算法,最初由 Paul Viola 和 Micha It is a machine learning based approach where a cascade function is trained from a lot of positive and negative images. It is then used to detect objects in other images. +通过 positive images(包含检测目标的样本) 和 negative images(不包含检测目标的样本)样本集进行训练的级联分类器,能够检测其他图像中的目标物体。 + +The algorithm has four stages: + +1. Haar[1] Feature Selection +2. Creating Integral Images[2] +3. Adaboost[3] Training +4. Cascading Classifiers + +## 标注 + +[1] Haar + +A Haar-like 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. + +This difference is then used to categorize subsections of an image. For example, let us say we have an image database with human faces. It is a common observation that among all faces the region of the eyes is darker than the region of the cheeks. Therefore a common Haar feature for face detection is a set of two adjacent rectangles that lie above the eye and the cheek region. The position of these rectangles is defined relative to a detection window that acts like a bounding box to the target object (the face in this case). + +[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). + +![Integral Images](./img/Deep_Learning_Haar_Cascade_Explained/001.png) + +[3] Adaboost + +Problems in machine learning often suffer from the curse of dimensionality — each sample may consist of a huge number of potential features (for instance, there can be 162,336 Haar features, as used by the Viola–Jones object detection framework, in a 24×24 pixel image window), and evaluating every feature can reduce not only the speed of classifier training and execution, but in fact reduce predictive power, per the Hughes Effect.[3] Unlike neural networks and SVMs, the AdaBoost training process selects only those features known to improve the predictive power of the model, reducing dimensionality and potentially improving execution time as irrelevant features need not be computed. + ## 参考资料 [人脸检测之Haar分类器](https://www.cnblogs.com/zyly/p/9410563.html) diff --git a/Algorithm/AI/img/Deep_Learning_Haar_Cascade_Explained/001.png b/Algorithm/AI/img/Deep_Learning_Haar_Cascade_Explained/001.png new file mode 100644 index 0000000..0d28315 Binary files /dev/null and b/Algorithm/AI/img/Deep_Learning_Haar_Cascade_Explained/001.png differ