glutengo / faceRecognition

Login with faceRecognition using microsofts face API. Implemented in Angular 4 and NodeJS.
22 stars 7 forks source link

FaceRecognition

This is a face recognition login implementation using Microsoft Face API. For detailed information about the API see https://www.microsoft.com/cognitive-services/en-us/face-api.

Features

Implementation Details

Backend

The backend is a lightweight nodejs application. It is written in javascript and uses common frameworks such as expressjs to provide a api. When starting, the application connects to a database. The backend application provides the following endpoints:

Frontend

The frontend is a angular4 web application. It was built with angular-cli. Angular material was used for layout. Interesting Techniques:

Setup

System requirements

To build and run the application without trouble, please make sure these are installed:

Configuration

This application can be configured in the file server/config.js All parameters are required. Please make sure you enter a valid FACE_API_KEY and DATABASE in particular.

DATABASE

Database URL to mongodb

SECRET

Database secret for password encryption

FACE_API_KEY

API key for Microsoft Face API communication. You can request a key here https://www.microsoft.com/cognitive-services/en-us/face-api.

FACE_API_HOST

BaseUrl for Microsoft Face API requests

FACE_API_PATH_VERIFY

Url path for Microsoft Face API endpoint verify

FACE_API_PATH_DETECT

Url path for Microsoft Face API endpoint detect

FACE_API_CONFIDENCE_TRESHOLD

When comparing faces, Microsoft Face API will respond with a parameter 'confidence'. This tells us how sure the API is that the given faces are actually identical.

Database

When running locally, you will need to start a mongodb. If you use the default database path (localhost:27017/faceRecognition) you will only need to start mondo using the command mongod.

Install components

To build and run the application, several third-party libraries are needed. To install them, run npm install in the root directory of the project.

Startup

Backend

First start the backend. Move to folder server and run node server.js The backend will start on port 8081.

Frontend

Move back to the project root and run ng serve. The frontend will start on port 4200.