Presence awareness by face recognition

You mean a custom classifier? I’m running OpenCV on a pi3 with HA and the OpenCV component. Obviously this is pretty computationally intensive for the Pi but it does work. Whether a pi3 is powerful enough for your requirements would require testing.

Yes. If I’m correct the classifier is the smart part of OpenCV. Finding the right one that works nice and reliable is indeed a matter of testing and tweaking I guess. Unfortunately I don’t have a spare PI3 so I can’t help with testing. But if I find a setup that does want we want to then I let you guys know.

Checkout this thread for some info on classifiers:

Also:

http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_objdetect/py_face_detection/py_face_detection.html#face-detection

Could train the classifier on your desktop pc the estimate the CPU requirements for deployment

This looks very relevant:

1 Like

That’s a very good example of a facial recognition system. And with a decent % of good results in recognition of known faces. Not sure if that percentage is usable for home automation (yet). And the CPU load is another thing. 2 or 3 camera’s running with face recognition is heavy…even for a macbook ;-). The Pi is used for less CPU intensive tasks in this setup. Good find @robmarkcole!!

1 Like

Found this nice tutorial for facial recognition on a pi using Google cloud service:

I’ve heard that Arlo Q security camera or the Q Plus (can’t remember the exact model) has this feature. Has anyone ever used a security camera with this feature? How effective/save is it?

That looks good… Hopefully there is a local version.

We can probably use Openface with a command line sensor.

1 Like

Thanks @arsaboo Openface on Docker was straightforward to get running on my Mac. This is the package which home_surveillance uses

I’ve started looking into Clarifai for facial recognition, appears to work well even in low light. The main limitation with this service is that you only get 5000 requests per month on the free tier, so approximately 1 request every 10 minutes.

Some of my code is on Github

Takes approximately 7 seconds to perform the facial recognition from a local file, and the bounding box is returned by the API.

Update: Clarifai is one of the slower cloud classifiers

https://blog.filestack.com/thoughts-and-knowledge/comparing-google-vision-microsoft-cognitive-amazon-rekognition-clarifai/

Does the 7 second delay depend on the processing speed of the host machine? 7 seconds delay makes it less useful for any automation.

The processing is on the Clarifai servers, so 7 seconds is from submission of the image to return of the result. Its certainly not good enough for video rate (which is not what I had in mind anyway) but probably adequate for unlocking a security system. Clarifai is interesting as it offers many models, not just facial recognition, and one can also train custom models.

I am interested to try the dlib (runs locally so probably comparable to openCV) and microsoft (following Microsoft own tutorial I can’t get this to work) components to see how they perform. With several cloud services offering similar recognition services, it must be that speed becomes a selling point. Cloud also appeals as less/no effort to maintain. Google an amazon also offer facial recognition API

I have been using dlib and OpenCV and their detection is far from ideal (or may be I have not configured them correctly). But, I still feel we should be able to use some of the local image_processing components or have some new one (we need a decent TensorFlow implementation).

1 Like

Agreed, I don’t have the patience for 7-10 second waiting times

What hardware do you have processing the OpenCV library? Is this leading to your far from ideal situation? I plan to have a dedicated Rpi Zero to process images I send to it so I’m curious about your experience.

I am using the Skull Canyon (Intel NUC; i7 and 32GB RAM).

OK so tried out Google Cloud Vision could API. Appears to be quite fast, but time varies quite a lot. Fastest to upload file and return result was about 0.5 sec, and slowest about 5 seconds.
Overall once you have it configured, Google Vision is quite a nice API. However I found it easier to get started with Clarifai.

https://github.com/robmarkcole/Useful-python/tree/master/Google%20Vision

Today I was looking for a DIY Thermal Image camera for detecting presence of people in a room. I found Max Ritters open-source solution on Github.

Looks interesting, have you built one?