top of page

TRAINED VIOLA JONES GALLERY

LBP

We attempted the training with 3 different detection types: Histogram of Oriented Gradients (HOG), Haar Features, and Local Binary Patterns (LBP). In each iteration of the training, we could declare the false alarm rate, the number of stages to run the training, and the type.

​

HOG detection focuses on detecting wavelets of a specific feature. It traces the outline of objects with wavelets and then trains itself to detect this specific pattern of wavelets. The wavelets are determined based on pixel gradients and point in a specific direction. These gradients are averaged, and a histogram is created. This specific detection is useful in detecting objects, such as cars or bikes, and is the default for Matlab training.

 

Haar Features are based on the Haar features used in the Viola Jones Algorithm.

 

LBP detection is about the differences in pixel values within a specific region. The image is broken up into 16x16 pixel windows, and then each pixel is examined relative to its 8 neighbors. From there, the neighboring pixels are looked at to see is they are more or less than the center pixel being looked at. From there, a normalized histogram is computed over the subwindow. Once all the histograms have been computed, the resulting vector of averages can be used to identify features. LBP is very good for finding specific textures, as it’s based on color differences.

 

We provided 61 positive samples with the nose region, or region of interest, labelled, and 244 negative samples.

 

After some experimentation, we found that a false alarm rate (FAR) of 0.1 with 8 stages was a good combination. If the FAR is too low, then it has a higher chance of missing detection, and if it’s too high, may detect too many features. The number of stages is based on the number of positive and negative samples provided. If too many stages are requested, the training will run until it cannot do any additional stages.

 

These parameters worked well for Haar and HOG, but when used on LBP, were very far off. When we increased the number of stages to 18, however, the results were significantly improved.

 

Overall, we did see significant improvement using our trained algorithm. We tested each training’s results with 10 headshots that were not used as samples in the training portion. The results are shown.

No Training

HOG

Haar

The HOG type proved to be the most accurate, as it had a 70% success rate, whereas the untrained had only a 10% success rate. We believe this is because noses have a very defined shape, and detecting the angles using wavelets was easier for the program.

 

The 18-stage LBP also worked slightly better, with a 40% success rate. This algorithm was not as successful, since it is based on neighbors and similarities in pixel values. Noses are pretty much the same color everywhere, so that it makes it difficult. However, it still was successful due to the histogram-based approach.

 

The Haar did not work for any, and even detected worse than the untrained algorithm. This is probably due to the fact that noses do not have a good lighting contrast, and so there aren’t any good features for the Haar features to base itself on.

This headshot only worked with 

HOG training.

​

We think this is because: the light contrast is difficult to see here

This headshot sample was never correct, and this was probably due to the tilting of the head in the photo.

This headshot worked with both HOG and LBP. This is probably due to the nose being very pronounced and also having some color differences.

This headshot worked with every type except Haar, where it detected more than the untrained algorithm. This is probably because Haar features are based on differing gradients of light, and it's hard to detect those on noses.

The columns show the number of noses detected using the specified type of training. 

​

The 1* values were "noses" detected but were not actually noses. 

bottom of page