Hacker News new | ask | show | jobs
by crankylinuxuser 3113 days ago
YOLO's a bad way to do it. I tried a bunch of facial recog libraries, had overall bad success for larger frame sizes and framerates. I also don't have a CUDA/OpenCL card for my laptops. So it's CPU for me.... Alas.

OpenCV's facialRecognizer class is one of the fastest I found. And it's what I used in my program.

Primarily, it does a LBP cascade finding "any face", including ones that look like walls. Thankfully it has False positives, but almost never false negatives. Then, I use each region of interest's area and do a haar cascade for eyes. If theres at least 1 eye in the region of interst, I pass it to the classifier.

From there, the classifier then runs the image zone into the classifier. If its not there, it adds it. if it is, then it adds this as another sample to further prove the face.

I can get 15 FPS@1280x720 on a Thinkpad T61

1 comments

If the same face is in two consecutive frames, do you pass it into the classifier twice?
Sure do. Doing that increases the quality of the classifier for that face-hash. That also helps if they show up a bit later with slightly different lighting.

I also implemented a "no more than 50 samples per matched face" to keep the size of the face-hash-db down.

https://hackaday.com/2015/03/04/face-recognition-for-your-ne...

and my old code's currently on gitlab, gitlab.com/crankylinuxuser . It's pretty crappy as it was a weekend hack. I need to separate the engine from the GUI, and make the GUI web accessible. There's a few more pieces to do that, but I was looking at selling it for various purposes.

Awesome. Thanks for the clarification re the 50 sample limit. And thanks for sharing the code.