Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

5.1 Authentification with facial recognition

David edited this page May 30, 2020 · 12 revisions

The Facial Recognition

The process can be started via face recognition. The following animation demonstrates how this works.

Face REcognition

Description

After entering the authentication website, the current image of the webcam will appear on the right side of the screen and when the "Authorize" button is pressed, an image will be taken and displayed in the right rectangle. This image is sent to the Face-Recognition API of Microsoft Azure in the background. First, the webcam tries to recognize a face from the image. In a second step this face is compared with a learned model to recognize the person. If no known person is recognized, the login fails. But if an entitled person is recognized, a webhook fetches the customer list via Integromat. From the customer list a customer can be selected. Afterwards the process can be started with the recognized person. As soon as the process is started, you will be redirected to the corresponding instance on the Camunda interface.

technical details

API

API Call Schema

For face recognition, the cognitive services of Microsoft Azure were used. (Microsoft Azure Face API). To interact with it a small API, written in PHP, is used for the backend. It consists of three files: analyze.php, save_image.php and start_process.php. The frontend is written in HTML, CSS and JavaScript.

save_image.php save_image.php receives an image via POST and stores it on the web server. In response it returns the path to the image. So we have a URL to the image for the next step.

analyze.php analyze.php receives the URL to the image via GET and sends it in a first step to the Azure Face detect API. It returns an array with all faces found. The faces are returned as IDs valid for 24 hours. The first element is taken from the array. In a next step, the face-ID and the group name "Paneer" are sent to the Azure Face identify API. The group was created before. A group is made up from people, each person was trained with pictures. The response is a person-ID. In the last step this is converted into a name with a GET request. This name is then returned by analyze.php via JSON as a response to the GET call.

start_process.php start_process.php is started with a GET request This API accepts person, customer, mandate and a businesskey. It starts the Camunda process via a GET request. The response is a JSON with the ID of the started process.

Get Customer List

The JavaScript frontend needs a list of available customer. Those customers are stored in a google spreadsheet database. To get the list of customer an Integromat scenario is used. This Scenario is called via a GET-request and uses the google-sheet integration from Integromat to subtract the customer. Then it is converted to json, using the defined data-structure, and is returned to the caller. GetCustomerList Integromat