Closed jmcastagnetto closed 5 years ago
Doc says: it can detect faces of dimension 48x48. Do the faces that you indicate have at least that size? Output also show a confidence called neighbours. You can use that according to your needs. FYI. Model was trained on data from http://mmlab.ie.cuhk.edu.hk/projects/WIDERFace, caffe convolutional neural architecture is here: https://github.com/ShiqiYu/libfacedetection/tree/master/models/caffe
I saw that, and If you look at the URL in the code, the face is bigger than that. Just so it is clear, I am including a manually cut rectangle of 94 x 79 pixels, containing the face.
Tested with a photo with people with different ethnicities from Peru and it also failed. Might it be a training bias?
Will check the source materials for the model next weekend and report back if I get a hint of what's happening.
this face is 45x62 - why don't you take larger faces.
OK, you were correct. Sorry for that. High-res versions do work.
For example, in this picture of people in Lima, Peru, it doesn't detect a face: https://www.maxpixel.net/static/photo/1x/South-America-Lima-Peru-Road-Colorful-Color-1244329.jpg
Another example, this time from Wikimedia, it detects 3 faces: https://upload.wikimedia.org/wikipedia/commons/e/ec/Urarina_shaman_B_Dean.jpg
Using a smaller resolution from the second image, it doesn't detect any face (source: https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Urarina_shaman_B_Dean.jpg/406px-Urarina_shaman_B_Dean.jpg)
I've used exactly the same code as the article in http://www.bnosac.be/index.php/blog/89-human-face-detection-with-r
I am showing below the results from printing the
faces
object:Is it a problem with the image resolution perhaps? If so, then it should be noted in the documentation, and perhaps change the comment in https://github.com/bnosac/image/blob/master/image.libfacedetection/man/image_detect_faces.Rd which in line 20 indicates:
Reproducibility information