Simple application example, using Node Js and API Amazon Rekognition. Index new faces, delete faces and the main functionality facial recognition using photo detect.
To start, you must have an AWS account, it is necessary to create collection and perform calls to API rekognition.
Install Node JS and AWS CLI in your enviroment.
The first step, create Collection in your terminal using the folow command
Make sure AWS CLI is configured with your keys
aws rekognition create-collection --collection-id <your collection name>
Run command to install resources
npm i
In file aws-config.js on folder /resource/config, put the collectionName and region that you create your collection
module.exports.collectionName = "PUT YOUR COLLECTION NAME HERE";
module.exports.region = "PUT YOUR REGION COLLECTION HERE";
And finally run command to start example
npm start or node server
The application running at port 3000
Using Postman
- POST /detect-face
POST /detect-face HTTP/1.1
Host: localhost:3000
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
photo=<source with image base 64>
- POST /index-new-face
POST /index-new-face HTTP/1.1
Host: localhost:3000
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
photo=<source with image base 64>&id_user=<id of user in your data base>
- POST /delete-face
POST /delete-face HTTP/1.1
Host: localhost:3000
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
face_id= <string with face id to delete>
Put param photo whitout "image/png;base64,"
- Node JS - The base for developer
- AWS Rekognition - API's with reconize
- AWS CLI - Used to create collections
Vamsi Ravi
This project is licensed under the GNU License - see the LICENSE.md file for details