Face Detection----Adaboost Learning Method

  With the haar feature and the integral graph to improve performance, can it be a good solution to the face detection problem? The answer is: no. Because the speed of calculating each eigenvalue is greatly improved, but a small 24*24 is the face image according to different positions,

As well as different scales, over 160,000 features can be generated! This number is too large, so a large number of features must be discarded. So, how can you be sure to use a small number of features while still getting accurate results?

  God always has a solution, Viola and others use adaboost to classify. To be clear, adaboost was not proposed by Viola et al., but by Freund and Schapire. But the greatness of viola is precisely because he used this model for the first time in face recognition, which made

The application of face recognition in embedded systems becomes a possibility.

  What is adaboost?

  AdaBoost, short for "Adaptive Boosting" in English, is a machine learning method proposed by Yoav Freund and Robert Schapire. [1] The adaptation of the AdaBoost method is that the samples misclassified by the previous classifier will be used to train the next classifier.

The AdaBoost method is sensitive to noisy data and outlier data. But in some problems, the AdaBoost method is less prone to overfitting than most other learning algorithms. The classifier used in the AdaBoost method may be weak (such as with a large error rate), but only

If its classification effect is slightly better than random (for example, the classification error rate of two types of problems is slightly less than 0.5), the final model can be improved. Weak classifiers with higher error rates than random classifiers are also useful because they can be assigned negative values ​​in the resulting linear combination of multiple classifiers.

The coefficient can also improve the classification effect.

  The AdaBoost method is an iterative algorithm that adds a new weak classifier in each round until a predetermined small enough error rate is reached. Each training sample is assigned a weight indicating its probability of being selected into the training set by a certain classifier. If a sample point has been accurately

If a sample point is not accurately classified, its probability of being selected is reduced when constructing the next training set; on the contrary, if a sample point is not accurately classified, its weight is increased. In this way, the AdaBoost method can "focus" on the harder (more informative) samples.

In the specific implementation, the weight of each sample is initially equal. For the k-th iteration operation, we select sample points according to these weights, and then train the classifier C k . Then, according to this classifier, the weight of the wrongly classified samples is increased, and the weight of the correctly classified samples is reduced.

Then, the weight-updated sample set is used to train the next classifier C k [2] . The whole training process goes on iteratively.

  What is the process of using adaboost for face detection?

  The first is to clarify the concept of cascade. All great things have simple ideas.

        Cascade structure:

  Operates by concatenating multiple strong classifiers together. Each strong classifier is weighted by several weak classifiers. For example, a cascading strong classifier contains about 20 weak classifiers, and then 10 strong classifiers are cascaded together to form a cascading strong classifier,

A total of 200 (20*10) classifiers are included in this cascaded strong classifier. Because each strong classifier has a very high discriminative accuracy for negative samples, once the detected negative samples of the target are found, the following strong classifiers will not be called continuously, which reduces a lot of detection time. because of a

Many of the areas to be detected in the image are negative samples, so the cascade classifier discards many complex detections of negative samples in the early stage of the classifier, so the speed of the cascade classifier is very fast; only positive samples will Send it to the next strong classifier for re-testing, which ensures that the final

The probability of false positives for the output positive samples is very low.

  The optimal weak classifier:

Find a suitable threshold to minimize the judgment error of the classifier for all samples. For each feature f, compute the feature values ​​for all training samples and sort:

Traverse the sorted eigenvalues, and for each element in the sequence, compute the following values:

 

     1. The weight and t1 of all face samples

 

     2. Weights and t0 of all non-face samples

 

     3. The weight and s1 of the face samples before this element

 

     4. The weight and s0 of the non-face samples before this element

 

     5. Classification error of this element: r=min{[s1+(t0-s0)],[s0+(t1-s1)]}

 Find the element with the smallest r value as the optimal threshold, and the optimal classifier is generated.

  Strong classifier:

For T rounds of iterations:

 

     1. Re-unify the weights

 

     2. Train the optimal weak classifier for this round (see the previous P for details)

 

     3. Reassign the sample weight according to the classification result in this iteration (increase the weight of the wrongly assigned sample)

     In this way, T optimal weak classifiers will be generated after T rounds

Combine T optimal weak classifiers to get a strong classifier:

  It is equivalent to letting all the weak classifiers vote, and then weighting and summing the voting results according to the error rate of the weak classifiers, and comparing the result of the voting weighted summation with the average voting results to obtain the final result.

 

  The training process of the cascade classifier:

 

 Reference documentation:

1 https://wizardforcel.gitbooks.io/dm-algo-top10/content/adaboost.html 

2 https://zh.wikipedia.org/wiki/AdaBoost  

3 https://blog.csdn.net/cyh_24/article/details/39755661 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325303770&siteId=291194637