FacePay – The face recognition based transaction system


This is my attempt to make a Face Recognition System for facilitating secure transactions, The FacePay. The application is designed such that the user had to first register and before doing any transaction, he/she had to update his/her profile picture. The system will use that same face for the reference and while making the transaction, it detects the person in front of the camera and then matches the face (in front of camera) with that referenced (registered user’s) image.

The transaction proceeds when the face is detected, recognised and matched with the registered user otherwise the transaction is terminated.

Website link: https://facepay-b93d2.web.app/

1 2 3 4 5 6

How to use

  • The Installation

To get started, you just need a browser.

  1. Clone this repository and open it in your favourite IDE or in terminal (Command Prompt in Windows). If Node.js is already installed on your system then you can skip the just below step.
  2. Install Node.js and along with this, npm will automatically get installed.
  3. Run npm install in the terminal. This will install all the dependencies related to this project.
  4. Run node server.js in the terminal. It will start the server, locally at port 3000.
  5. Type http://localhost:3000/ in the browser’s url.
  6. The application is live now.
  7. To stop the application, just stop the server by Ctrl+C in the terminal.
  • While using the application

Wohoo! You made it till here. Now, let’s dive into the FacePay.

  1. Before using you need to register in the application by clicking the Sign Up button. And, then login.
  2. Now, upload your profile picture. You can navigate there by clicking the round-shaped image aside of Log Out button.
  3. Select the transaction type and fill the transaction details. Click the Next button.
  4. The application will start loading the camera and the ML models.
  5. Click Start Verification to verify and authenticate yourself.
  6. If you were verified successfully then you will be ask for initiating payment. Click Pay button to initiate. Now, you will be seeing the SUCCESS message on the screen.
  7. If you were not verified, the application will reject the payment and you will be seeing the FAILED message on the screen.

Technology Stack and Documentation

This project is possible with:

More on Machine Learning Models

JavaScript API for face detection and face recognition in the browser implemented on top of the tensorflow.js core API (tensorflow/tfjs-core)

  • Face Detection

This application is using SSD (Single Shot Multibox Detector) based on Mobilenet V1 neural network for face detection. Such a network is trained to generate a very accurate and almost unique 68 points face-landmark detection vector, given that, the images of faces which are fed to the network are properly aligned and cropped.

  • Face Recognition

Then, for face recognition, a ResNet-34 like architecture is implemented to compute a face descriptor (a feature vector with 128 values) from any given face image, which is used to describe the characteristics of a person’s face. It can determine the similarity of two arbitrary faces by comparing their face descriptors using Euclidean Distance or any other classifier.


View Github