Face detection and recognition



Playing around with face detection and recognition stuff is always good fun, and the OpenCV (open computer vision) libraries make it relatively straight forward to play with. If your interested in this, be sure to take a look at the OpenCV page in the Python section of my website.

Those who attended the middle school disco on the weekend would be aware I had my laptop running an automated photo booth that was taking photos when it detected at least 3 people standing in front of it. I thought I might share the code for those who are interested to see how I did it, so I’ve added it to the OpenCV page on my website.

I should point out you aren’t limited to detecting faces. You could, for example, detect hands and so use gestures to control a video game instead of the mouse or keyboard. Plenty of fun to experiment with!

What application ideas can you dream up that uses computer vision?


Thanks Mr. B. Perhaps one could make a counting software for inventory management of stuff. Probably sticking QR codes on everything would be better but thanks anyways.
Also, why would you use Mailgun rather than a nice self-hosted Postfix server? Much more fun to setup and all.


Also, your project’s home is unavailable at: https://pbaumgarten.com/visionmadeeasy


Hi Paolo

OpenCV version 4 now supports QR codes as this demo illustrates.

There’s also QRTools for Python which uses the ZBar library which can also work with barcodes.

You can also use an OpenCV classifier for ArUco codes (like a simplified QR code designed for robotics applications)

Regardless, there are lots of fun projects to be had.

PS - Mailgun was about ensuring reliable delivery of mail. Most of the major consumer email providers such as gmail block the vast majority of self hosted mail solutions as part of their anti-spam efforts. I get 30k free emails a month with Mailgun which should suffice for this forum.


Thanks, fixed. Though the project home isn’t actually “comprehensive”, more of a “placeholder”.


well, thanks for the stuff about QR/barcodes/aruco. Hopefully I’ll have time to look into that. Right now I’m just trying to get libvirtd working over TLS to get live VM migration.

I’ve been running my mail server for celati.com on one of my VMs at my house for about three years now and it’s very much a set up and forget thing but ok, perhaps if you care less about having stuff on-site and you prefer an external solution Mailgun looks like a good choice.

the URL on pypi is now pointing to: https://github.com/pypa/visionmadeeasy and I guess you either want https://pbaumgarten.com/visionmadeeasy/ or https://github.com/paulbaumgarten/org.pypi.visionmadeeasy


Thanks for the reminder, I’ve been aware I needed to push an update to pypi. I have a couple of tweaks to make to the library as well so will finish testing those and then update in the next couple of days. I need to fix the same glitch in easyaspi as well :neutral_face:


Phillip Morris is developing a facial recognition software for one of their websites which will know your most likely age from an image of you from your webcam to restrict access to minors.


I wasn’t aware of the Phillip Morris work (do you have an article link?), but I do know that ETH Zurich have been using neural networks to attempt to estimate age & gender from photos. link

There’s a python project using Tensorflow that uses the ETHZ data here, though you can tell it has a long way to go before you’d consider it “accurate”.

Part of the problem, I imagine, is that the source images for ETHZ are websites like IMDB using studio released photos, so make up & styling etc would be having an impact.

Testing out the accuracy for yourself could be a very interesting Extended Essay project… :thinking:


That might be what I want to do. Actually most likely. Dips 10:37 AM 18/02/2019


@dsantospiedrabuena Dibs* also it’s all yours but that will take a huge chunk of time. Face recognition algorithms may take a very long time to acquire enough data for in the form of an evaluation and training set.


I have heard that the Chinese government is using computer vision and facial recognition software to record the face of every single citizen that passes by a security camera or checkpoint. It’s a good example of this technology being used for purposes that aren’t necessarily the best.

Source: http://fortune.com/2018/10/28/in-china-facial-recognition-tech-is-watching-you/


Hi @tanand. As the wise man Ben Parker once said, “with great power comes great responsibility”! The problem with technology is that it is generally benign; it is the user who decides intent. The US, Australia and most other industrialised countries are also all heading down this path. When a new, game changing technology emerges, it generally brings with it some complex issues for society to grapple with, and this is a perfect example. Last century it was nuclear technology. This century it will be about data and AI. It will be very interesting to see where we are in another 10 or 20 years.