on 9/10 tests I did on this php code, it didn't find a face - is this due to the data or the algorithm inaccuracy?
edit:
it is more 10/10 since one that kind of recognizes a face is on a multi face image and it kind of frames a torso with head. I've tried your JS version and it works on single face and multi face images to recognize one image, however multi face recognition seems to be broken - blue bar comes to the end and that's it, nothing happens ever.
I have not looked at the PHP code but a few things I can think of off the top of my head
1) The detector doesn't like faces that are slightly rotated, either in-plane or out of plane.
2) The detector is "racist" in the way that most of the training images used were Caucasian people and therefore it works best on Caucasian.
3) It fails badly on kids because they aren't present in training data.
Try normalizing your data a bit for that and see how it works out. If you want a detector that works better , simply use the one in openCV since it does a more thorough detection. The performance optimizations I did also cuts down the accuracy of the algorithm ( assuming his port has those too ).
funny because when I've uploaded a test image I found on google with multiple faces - I've run a single face detection and it selected a third face on the image which is not caucasian :)
edit: it is more 10/10 since one that kind of recognizes a face is on a multi face image and it kind of frames a torso with head. I've tried your JS version and it works on single face and multi face images to recognize one image, however multi face recognition seems to be broken - blue bar comes to the end and that's it, nothing happens ever.