Cloud-based Face Recognition for Alya Smart Mirror

Tareq Al-Maamari
3 min readMar 12, 2018

--

Only few days till the deadline for Eclipse Open IoT challenge 4.0 deadline, till that time, we would like to yet reveal another feature that Alya has and supports. Alongside with the voice recognition support, Alya supports personalization through face recognition, in this article we will go through cloud-based face recognition in Alya.

Overview

Recognition starts by telling Alya’s application to start recognizing using your face, the application will inform Alya that someone needs to be detected, at this time, Alya will start waiting for the user to stand in front of it to detect their face, then an image of the user will be captured and sent to a cloud-based face recognition service to detect and check if that face belongs to a registered user and respond to the mirror by that user’s id, once the mirror gets the confirmation, the profile of that user is loaded.

Technologies Used

Alya supports two kind of face recognition ( built-in and cloud-based ), our built-in solution is based on Matrix camera, this will be explained by Bilal’s blog, in this article we would like to go through the cloud-based solution.

Neural Network and Deep Learning

The revolution in the neural network and deep learning made our goal very easy to achieve, as the goal is to use a cloud-based face recognition to avoid any computing overhead in Alya, we decided to go with Amazon Rekognition cloud AI ecosystem.

The reason why we chosen Amazon Rekognition is simply because there is none !, yes, we don’t have any reason rather than it worked when we tried it in the first time !. In addition, the main goal of the cloud-based face recognition, is to show that Alya can be flexible and support whatever you want.

MQTT messaging

The communication from and to the mobile and Alya is through the open source standard MQTT. To avoid operation costs, we decided to use a cloud-based MQTT solution.

React-Camera

The camera component we used is a ready react component called react-camera and it fits well in our use case, thanks to our friends in the open-source community who built it (Miniplop/react-camera)

Getting Started

To get started, you need to have Amazon Rekognition and IoT services, after you create such services (Amazon Recognition), add your credentials ( get it from here) and place it in the configuration file (config.defaults.json). As soon as you locate the configuration file, you just need to run it !

It worth mentioning, this is a core add-on, that means, you get it once you have Alya itself, no need for any additional steps.

--

--