Search face by image module code

This module takes an image from the S3 bucket as input and performs a search and comparison operation with the data stored in the collection. If a similar face is found, it will provide the output with the percentage of similarity between the input and a similar image found in the collection. Create a file with the name searchFacesByImage.js and include the following code:

var AWS = require('aws-sdk'),          fs = require('fs');AWS.config.update({ accessKeyId: 'YOUR_ACCESS_KEY_ID', secretAccessKey: ‘YOUR_SECRET_ACCESS_KEY'});AWS.config.update({region:'ap-southeast-2'}); var rekognition = new AWS.Rekognition(); module.exports.searchFaceMethod = function (callback) {var params = {  CollectionId: 'piCollection', Image: ...

Get Internet of Things with Raspberry Pi 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.