Posts

Showing posts from May, 2020

8 different ways to detect faces in images

Over the years of doing many A.I. algorithms revolving around humans, I needed to detect faces as the first step, Many methods for detecting faces have sprung up by different packages and although they might look to be the same, different applications could make use of the difference between them as some of them are slower than the others while having immunity to occlusion or noise, some of them are slow with no apparent benefit, some are fast but only work on relatively noise free images, some can only detect front faces, some are cpu based and others use the gpu which means not all can be used on all embedded systems like Raspberry pi for example, sometimes you just have the option of using that one package. So it all depends on your choice . Also one seemingly minor factor that can affect detection significantly is the image scale.                                           ...

Use opencv to detect faces using 11 different caffe models

Image
Although many tutorials on using opencv and cv2.dnn.readnetfromcaffe exist over the internet , all of them just use the same model and don't reveal the fact that not all models work the same way. I will be sharing some data related to the performance of  all of those models. You can also check my tutorial on caffe models and how to read them. I, as many others, use opencv mainly for image augmentation or processing. I used opencv for real time applications on embedded systems such as raspberry pi or nvidia jetson. Here i will be showing the results for two aspect ratios 1.0, 1.0/255.0 . The results shown will be the ones with the class human, but i will be showing the overall results as well with a confidence less than the max reported confidence for an object minus 0.3 as i have seen some weird results. Some models work with an aspect ratio and produce completely wrong results on the other. Some models detect a different set of faces on each aspect ratio. I tested...