WEEK-2

 Weekly Update: 03-05-2021

Studied various ways and methods to obtain Video stream and their Pre-processing Techniques. Thus Concluded and developed Code for face detection. Details is as Follows.

This week we compared different face detection models based on their performance.

The two models we majorly focused on are

1.   Haar Cascade :

          Object Detection using Haar feature-based cascade classifiers is an effective object detection method proposed by Paul Viola and Michael Jones in their paper, "Rapid Object  Detection using a Boosted Cascade of Simple Features" in 2001. 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.




2.   Dlib’s Histogram of Oriented Gradients (HOG)

The principle behind the histogram of oriented gradients descriptor is that local object appearance and shape within an image can be described by the distribution of intensity gradients or edge directions. The x and y derivatives of an image (Gradients) are useful because the magnitude of gradients is large around edges and corners due to abrupt change in intensity and we know that edges and corners pack in a lot more information about object shape than flat regions. So, the histograms of directions of gradients are used as features in this descriptor.

Comparison Examples:

Example 1:

Fig 1.A detection Haar model

Fig 1.B detection by dlib’s HOG model

·       In the above images we can observe that in fig 1.A Haar model produces many false positives like on the pillar and pants.

·       Whereas in fig 1.B dlib’s model is more accurate and also do not produce any false detection results.

Example 2:

 Fig 2.A detection Haar model

Fig 2.B detection dlib’s HOG model

·       In the above images we can observe that in both fig 2.A and 2.B models produces great results, even with far faces.

Example 3:

Fig 3.A detection Haar model

Fig 3.B detection dlib’s HOG model

·       In above fig 3.A we can see that the model has detected the stomach as face, it clearly fails to classify in this case.

·       Whereas dlib’s model in fig 3.B has detected face correctly.

Code Snippets:

The examples we saw above were the Outputs obtained from the below Developed Code. 

We have Timed the Execution to Analyze the models processing times.

1. Haar Cascade Model:



2.HOG Model:


Processing Speeds:

·       A single frame takes about 0.85 secs in Dlib’s HOG model, whereas Haar classifier takes about 0.70 secs.

·       Even though Haar classifier are faster in processing , the results when compared the difference is very negligible.

Conclusion:

Clearly dlib’s Histogram of Oriented Gradients produce way better results with a very minimal processing time and computational power compared to haar cascade model.

Hence we use HOG models to detect the face from the frame. 


Comments

Popular posts from this blog

04-07-0021

31-05-2021

07-06-2021