Ask Your Question

Facial Recognition with OpenCV and Alexa

asked 2018-01-22 08:30:20 -0500

Camerutttt gravatar image

Hi I was wondering if it is possible to link OpenCV powered by a Raspberry Pi and Alexa together. The basic idea is to have a camera installed with the Pi, and have it recognise faces along with Alexa for voice commands. So an example would be a person named Peter, facing the camera and Alexa will say Hi Peter. Or it could be when Peter asks Alexa who am I, Alexa will reply you are Peter. Something alone the lines. I plan to use OpenCV for machine learning so that it recognizes people.

Is this project feasible? If so, how do I get started? I have seen people recommending me to use OpenCV.js, but Im not sure what is the purpose of OpenCV.js and how does it help me with my project. Also, I have seen people doing similar projects like the Alexa who is at the door, should I follow it instead and just make it do a video instead of taking pictures.

Thank you very much.

edit retag flag offensive close merge delete


Yes it is feasible in my opinion. Your best place to start is the tutorial section of the framework. Get some OpenCV experience, try some stuff out and then head back when you have issues.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-01-22 09:33:41 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-01-22 10:09:53 -0500

updated 2018-01-22 10:11:03 -0500

Yes it is possible to do what you want. Your general pipeline would consist of two parts:

  1. Vision: There are so many tutorials out there on how to detect specific faces using OpenCV. I will leave this to you to do the research.
  2. Alexa: This is were things get a little tricky. I have never used their SDK before so my response is merely based on a 10 minute research I conducted.

According to their documentation, they do have a Raspberry Pi SDK.

If I were you doing this, I would just set my own custom Alexa Wake Word which when triggered, would snap a photo and run the OpenCV stuff. For your case, the face detector model was already built on a known set of people so it simply returns back a label i.e. their name. So once the vision stuff is completed, you can create your own custom response and send it back as text input for Alexa to convert to speech.

OpenCV.js is simply a javascript library of OpenCV. Which version to use depends on which language you are mostly familiar with. Along with this, you also need to keep in mind of the types of SDKs offered in Alexa.

I suggest you read their tutorial first.

Finally, I would recommend doing the vision and Alexa components separately first then merging them together to create your final app.

Cheers mate :)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-01-22 08:30:20 -0500

Seen: 341 times

Last updated: Jan 22 '18