Presence awareness by face recognition

Right now beacons are an affordable way of using presence with your automations in HA. But you always have to carry your phone (with OwnTracks) or a beacon (if using Happy Bubbles) with you (or you could probably have a BLE wearable like a smartwatch) to let HA know who is where. And that is a major deal breaker for me. I don’t want to wear technology all the time. I want my house to be smart and figure out the ‘presence stuff’. I think face recognition (with night vision) is the next step for presence awareness and home automation.
For instance the Tend Secure Lynx Indoor and Netatmo Welcome camera’s are one of the first affordable face recognition consumer grade solutions. The Lynx is the most affordable. I did some initial research on the performance of face recognition of both camera’s and they are not that reliable. For home automation that works we need reliable hard and software. Do you have a reliable and affordable face recognition setup working with HA? Let me know.

BRUH Nest IQ vs Arlo Pro vs Arlo Q - Smart Home Camera Comparison

1 Like

Could of options in Image Processing category I will try. Also Clarafai

I’ve been thinking about this… I’d love to have a go at building my own sensor! If you had an IR camera (apparently most camera can do IR… you just need to take a filter out) With one of those LIFX bulbs lighting the whole room with invisible IR light…

I’ve been playing around with the opencv component HA has too.

Aren’t cameras a bit intrusive though? My partner thinks so…

There’s a MagicMirror module:
Maybe this is something to start from for using on HA

how is your experience? I want to know more before I dive deeper into this.

Very early stages at the moment… I am not looking to do facial recognition but OpenCV can detect human body shapes or ‘pedestrians’ I have been able to feed the open CV component random images but I don’t think I have it set-up right. :frowning:

1 Like

Thanks. So i take it as not up to your expectation… yet? Anyway, I came across this article . Haven’t got the time to really absorb this yet. Maybe it is helpful to you.

Yea I have looked at this guys site before. That’s a very handy link though. Thank you!
… This guy seems to employ a-lot of marketing techniques before you actually get any decent information regarding OpenCV itself.

That’s a nice tutorial on installing OpenCV. One further clarification I would like to make is that there is a difference between face recognition and face detection, Face detection is when computer vision software knows if a picture or video has a face in it or not. Face recognition can use a database with names, ages, etc and some training data (images and/or videos) with faces that matches with data in the database. This matching is what makes face recognition so appealing for home automation. The big question is how good is OpenCV in face recognition? It has to work reliable to use it for automation.

Aren’t cameras a bit intrusive though? My partner thinks so…

Camera’s are indeed intrusive for most people. But as they are becoming smaller I think there will be a point where we won’t even know or see there’s something watching us. For the WAF you can say that all data stays local and will be deleted every day. Maybe that will help.

Tutorial on how to write Face Recognition in Python. Unfortunately it’s on a Windows box but programming is done in Python.
Part 1:
Part 2:
Part 3:
Part 4:

And this one.
I was wondering if OpenCV can detect faces from the side. And it does (not in demo but the presenter confirmed it):

1 Like

Thanks for sending these. I look forward to watching them later!

For processing/face recognition you definitely need processing power so you need a Raspberry Pi or something more powerful. However an Arduino could probably be used to feed the camera and sensor data to the Pi. Can anyone verify that? But maybe this could cause some latency and that’s not wat we want. It would be nice if the size of the whole setup is as small as possible. If only for the WAF :wink:

Dlib Face Identify works great for me . Very simple to configure.


How good is the recognition rate ? Does it work with a camera pointed to the front door (from inside) ?


I’ve used DLIB combined with a motion detection algorithm to create facial recognition. My code is not optimized, so it runs very slowly, but it does work. I’m able to get matches/non-matches after training. It doesn’t do recognition on the side of the face though.

Google recently released Tensorflow models that are a lot more efficient and can be retrained to recognize specific people, but I haven’t dabbled in them at all; I wouldn’t know how to retrain a model for facial recognition. I bet at this time, it would be the best solution. Someone just needs to put it together and interface it with Home Assistant.

I don’t think it will be able to run anywhere near real time on the Pi though. I got the standard object recognition model to run on my 8-core AMD FX-8300 without a GPU card and it pegs it at about 60% and that’s just one camera. This is where motion detection and good coding will need to be done to create a multi-camera system for presence detection. Good luck.


OK I got the openCV component running on my pi3 with Sketch by following this guide

Works nicely!


Of interest:

1 Like

Watched the whole video on! Thanks for sharing. This project is a very nice summary of how to build a basic camera with object detection with OpenCV. In this case humans. The next step is to find an OpenCV setup that can detect humans with training data (pictures stored in a folder) and names in database. With the goal to detect for example if Jeff, John Doe or a stranger is walking into a room. The video links I posted earlier can help with that but a working setup/video demo would be nice to check how fast/reliable the opencv software works.