Skip to content

Proof-of-concept website with CRUD functions using faceapi for face recognition.

License

Notifications You must be signed in to change notification settings

kennethsoh/faceapi-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

faceapi-website

License Snyk Vulnerabilities for GitHub Repo

This project, using faceapi, is a proof-of-concept website.
The HTML files are minimally styled, and minimal directions are provided for page navigation.

Important: This website is not designed for deployment, hence it is not secure by design.

Installation

  1. Read license terms before proceeding.

  2. Clone or download this repository and navigate to its folder.

$ git clone https://github.com/kennethsoh/faceapi-website.git
$ cd faceapi-website
  1. Install and set up node.js and mysql server.

  2. Install additional required npm modules

$ npm install body-parser express fs multer mysql rimraf
  1. Set up mysql server, creating 1 database: "logs", and 2 tables: "logs" and "users".
> CREATE DATABASE logs;
> CREATE TABLE IF NOT EXISTS logs.logs (`logid` INT NOT NULL AUTO_INCREMENT,`name` VARCHAR(64) NOT NULL,`date` VARCHAR(64) NOT NULL,PRIMARY KEY (`logid`));
> CREATE TABLE IF NOT EXISTS logs.users (`userid` INT NOT NULL AUTO_INCREMENT,`username` VARCHAR(64) NOT NULL,`password` VARCHAR(64) NOT NULL,`imagelink` VARCHAR(64) NOT NULL,PRIMARY KEY (`userid`));
  1. Depending on your mysql database setup, edit db_connection.js for the correct user and password.

Usage

  1. Start the node server and check that the database is connected
$ node server.js
Application listening at http://127.0.0.1:3000 ; enter CTRL + C to stop
Database Connected!
  1. Open a web browser and enter 127.0.0.1:3000 in the url bar. You may need to allow webcam access.

Features

Face Recognition

Use of faceapi, implemented on top of tensorflow.js core. This software is able to recognise faces and match them against uploaded images.

User Registration and Image Upload

Upload your own image for faceapi to recognise you. To do this, register for an account at 127.0.0.1:3000/register. Login to an exisitng account at 127.0.0.1:3000/login.

Note: Due to existing limitation, your image needs to be renamed to your username before upload. (i.e. If your username will be 'Alice', rename your image file to 'Alice.jpg'). JPG, JPEG and PNG file types are accepted.

User Management

Update your registered image and your password at 127.0.0.1:3000/user. You will only be able to access this page if there is an existing user session. You may also remove your image from the web server by deleting your account.

About

Proof-of-concept website with CRUD functions using faceapi for face recognition.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published