Haar cascades versus LBP cascades in face recognition

I experimented with face detection in the OpenCV (Open Source Computer Vision Library) and found that Haar cascades can be used to detect faces, as some of them have OpenCV. However, I noticed that there are also several LBP cascades. After doing some research, I found that LBP stands for local binary patterns and can also be used for face recognition according to the OpenCV Face Detection Documentation .

What I would like to know does this work better? Which one is faster and which is more accurate? LBP seems to be faster, but I'm not 100% sure either. Thank.

+43
opencv face-detection haar-wavelet cascade viola-jones
Jan 09 '12 at 15:53
source share
5 answers

LBP is faster (several times faster), but less accurate. (10-20% less than Haar).

If you want to detect faces in an embedded system, I think LBP is a choice because it does all the calculations in whole numbers. Haar uses floats that are killers for inline / mobile.

+48
Jan 9 2018-12-01T00:
source share
โ€” -

The LBP cascade can be trained in the same way (or better) than the Haar cascade, but out of the box, the Haar cascade is about 3 times slower, and depending on your data, it is 1-2% better with accurate detection of the location of the face. This increase in accuracy is significant because face recognition can work in the accuracy range of 95% +.

Below are some results when using the MUCT kit .

Correct detection is noted when there is at least 50% overlap between the detected ground and the detected OpenCV coordinates.

Cascade:haarcascade_frontalface_alt2.xml Datafile:muct.csv |---------------------------------------------------| | Hits | Misses | False Detects | Multi-hit | | 3635 | 55 | 63 | 5 | |---------------------------------------------------| Time:4m2.060s 

against

 Cascade:lbpcascade_frontalface.xml Datafile:muct.csv |---------------------------------------------------| | Hits | Misses | False Detects | Multi-hit | | 3569 | 106 | 77 | 3 | |---------------------------------------------------| Time:1m12.511s 
+14
May 23 '14 at 19:28
source share

My personal opinion is that you should learn LBP for all discovery tasks, simply because LBP training can take several minutes, while HAAR training can take several days for the same dataset and parameters learning.

The question you ask will have different performance depending on the type of thing discovered, the training settings and parameters used during the discovery, as well as the criteria for checking cascades.

The accuracy of both HAAR and LBP cascades depends on the data sets (positive and negative samples) used for their training and the parameters used during training.

in accordance with Lienhart et al, 2002 , in case of face detection:

  • the -numStages , -maxDepth and -maxWeakCount must be high enough to achieve the desired -minHitRate and -maxFalseAlarmRate .
  • Wood based learning is more accurate than stump based learning,
  • soft ababust is preferable to discrete and real adaboost,
  • the minimum sample size is important, but a systematic study has yet to be done.

the flags used in detectMultiScale () also lead to a sharp change in speed, as well as accuracy in a given hardware configuration.

To check the cascade, you must install a method such as k-fold cross-validation on the data set .

+9
Nov 23 '13 at 11:05
source share

Maybe this will be useful for you:

There is a Simd Library that has an implementation of cascading HAAR and LBP classifiers. It can use standard HAAR and LBP cascades from OpenCV. This implementation has SIMD optimization using SSE4.1, AVX2, AVX-512 and NEON (ARM), so it works 2-3 times faster than the original OpenCV implementation.

+7
May 05 '16 at 12:01
source share

In addition, the LBP is faster during the training stages than Haar. With a sample of 2000 pos and a 300 negative sample, using the Haar type, it took about 5-6 days, but with LBP it took only a few hours.

+5
Jun 02 '13 at 0:32
source share



All Articles