Easily add face detection to your project with the Person Sensor module

It’s now much easier to AI features to your project thanks to better tools, but as we’ve experienced when trying out Edge Impulse machine learning platform on the XIAO BLE Sense board, it still requires some effort and the learning curve may be higher than some expect.

But for common tasks like face detection, there’s no reason for the solution to be hard-to-use or expensive, and Pete Warden (Useful Sensors) has designed the $10 Person Sensor fitted with a camera module pre-programmed with algorithms that detect nearby faces and reports the results over an I2C interface.

 

Person Sensor

Person Sensor specifications:

  • ASIC – Himax HX6537-A ultra-low-power AI accelerator @ 400 MHz with 2MB SRAM, 2MB flash
  • Camera
    • Image Sensor – 110 degrees FOV
    • Image scan rate – 7Hz with no facial recognition
    • Image scan rate – 5Hz with facial recognition active
  • Host interface
    • Qwiic connector for the I2C interface up to 400 Kbps
    • Interrupt pin used to indicate if any people have been detected.
  • Operating Voltage – 3.3V
  • Power consumption
    • Up to 150mW
    • 5mW for the LED
  • Dimensions – Small…
Face detection box
Coordinates for face detection

You’ll need to connect the module to a host microcontroller that with either poll for data or use the interrupt pin, and get face detection coordinates out of a 256×256 pixels area, as well as confidence in percent, and whether the face is facing the camera or not. No image data is sent to the host and as such it offers improved privacy. Note the Himax microcontroller is preprogrammed and you can’t update the firmware or get updates.

A sample program (polling mode) for the Raspberry Pi Pico would look like this:


The module will also return identity information, or in other words, try to detect up to 8 different users, but this is not shown in the example above, and it’s not clear how well that works. You’ll find documentation and code samples in different languages including Arduino, CircuitPython, and Python on GitHub.

The video below shows a face following fan demo based on the Person Sensor module.

The Person Sensor is listed on Sparkfun for $9.95, but is out of stock and on backorder at the time of writing.

Via Hackster.io

Share this:

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
5 Comments
oldest
newest
Jqpabc123
Jqpabc123
3 months ago

“Detecting” a face is interesting but what happens next? Is there something more you can do with such a low resolution image? Maybe trigger recording with a better camera?

It’s hard to imagine that identification could be very accurate from such a low resolution image.

xtract
xtract
3 months ago

Just an idea, but you could attach it to a desktop fan with some servo motors, and make it follow you, instead of relying on the usual side-to-side mechanisms.

Well, that works unless you are standing the whole day. Then you can skip it.

andelf
andelf
3 months ago

Or a “robot” that can face onlookers (and say something “Halloween-y”). I’m thinking a Dracula doll, or a skeleton. Could possibly also follow onlookers with it’s eyes

Willy
3 months ago

It’s fun because what made me start to work with an hexapod bot ~12 years ago was precisely an attempt at making it follow people, a bit like a dog. Face detection on a 500 MHz Geode LX was not that great, to say the least. Future improvements with Allwinner H3 was slightly better but not awesome. Seeing such tiny autonomous devices instantly reminds me lots of time spent trying to just detect a face in moving images before the person left the room 🙂

udif
udif
3 months ago

The 256×256 grid is merely used for the location of the face detected. You don’t get any face image at all.
The camera resolution used for face detection is not given, as the whole solution is a black box, and you don’t get back any image from the sensor anyhow.
All you should care about is whether this sensor is working reliably or not.

Weller PCB manufacturer