unicodeveloper / face-detection

:man: :woman: An app to detect facial attributes (with focus on the eyes), on a human and append a pair of glasses or harlequin mask.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Face Overlay App

“GitHub

👨 👩 An app to detect facial attributes (with focus on the eyes), on a human and append a pair of glasses or harlequin mask.

Setting things up

Clone the repository

$ git clone git@github.com:unicodeveloper/face-detection.git

Install Dependencies

Before continuing, this app requires node $ npm installed on your machine. Once you have confirmed your node installation,

  • Change directory into the server directory of the app
$ cd face-detection/server
  • Install npm packages
$ npm install
  • Set up http server To render our static html files, you could use a simple http server like http-server. To install run the command
$ npm install http-server -g

Working with Cloudinary

This application is dependent on Cloundary's API. To continue, you will need to sign up here. Once that's done, on your console fetch your cloud_name, api_key, api_secret and then add them to your index.js file located in the server/ directory.

NB:

  • You also need to activate Advanced Facial Attributes on your cloudinary account - don't worry it's 'kinda' free 😜 .
  • You need to upload the images from the assets directory to your media library and rename them to glasses and harlequinmask since those are the two masks we are considering

Running things

To run the app, in the root directory of our app we start our backend server with this command

$ node server

You'll get a response like

Listening on localhost:3333

This means your backend server is running on http://localhost:3333/

You also need to run your http-server by using the command

$ http-server

Once that's done, you get a response like

Starting up http-server, serving ./public
Available on:
  http://127.0.0.1:8080
  http://172.20.10.9:8080

Now you can navigate to http://127.0.0.1:8080/ to see the app at work 😇

License

MIT

About

:man: :woman: An app to detect facial attributes (with focus on the eyes), on a human and append a pair of glasses or harlequin mask.

License:MIT License


Languages

Language:HTML 79.5%Language:JavaScript 20.5%