Amazon Rekognition With Nodejs Part 1
Nowadays, I am trying to develop an application for face recognition. I have searched for solutions for face detection and recognition. As…
Amazon Rekognition With Nodejs Part 1
Nowadays, I am trying to develop an application for face recognition. I have searched for solutions for face detection and recognition. As I understand, It is possible that for me, using Python and about libraries, I could detect faces but face recognition is not possible. This was because I don’t know machine learning and artificial intelligence. I still don’t know😁. And I have surprised and enlightened when I come across the AWS Rekognition Service. Let's talk about its skills and how you can use it easily with NodeJS🚀
With the Amazon Rekognition service, your application can detect and recognize any people. Not just this, you can use it to detect Inappropriate content to filter your application content to avoid bad or sexual images. So let’s list its skills;
- Face detection, recognition, and comparison (we will focus here)
- Face Analysis (emotional status, accessory, jewelry)
- Celebrity recognition (It can recognize all celebrities even he would be Ajdar [Turkish singer])
- Video segment detection (It can detect intros outros, I’m not sure but I think, YouTube Vanced is may using it to skip intros, outros, and product placement advertisements)
- It has more skills you can check the official page of **Amazon Rekognition**
Let’s talk about a scenario. Assume that, There is a man and his name is Selami. We can call him just Selo. Selo has a company about security. The name of the company is Selo Security. Selo Security has 5 different departments and the privacy between each department is important. Any department personnel should not enter the other department office. Therefore Selo wants to mount a camera for each office door. When any person approaches any office the door opens if the person’s office is there. Hereby, Each personnel can enter only their own office. 😒if you believe.
Let’s talk about how we can solve Selo’s problem with Amazon Rekognition and Nodejs. 👌
Before starting, I think, the best source is the official document. And you can reach it here.
If you want to apply, you have to create a Nodejs project and install the AWS package from the NPM with the following steps and terminal codes.
npm init
then create a js file with any name like main.js or index.js
npm i aws-sdk
and on your js file include the Rekognition from “aws-sdk”
const { Rekognition} = require(“aws-sdk”);
When you create a new Rekognition instance you can recognize faces 🥳
const rekognition = new Rekognition({
region: config.region, // like us-east-1
});
Let’s assume we take a photo from any camera of Selo Security. Firstly, we should check that;
- Is there a person's face on the photo?
- If there is a face, is it a face we know?
- If the face is we know, can he/she enter this camera’s office?
The Nodejs code that the first question “Is there a person’s face on the photo?”
Let’s say we keep the photo as photo.jpg.

detect faces function
When this code run and if there is a face on the photo, the console looks like this

terminal image
This scene is not very understandable let's change the code to write the result in a JSON file rather than a console.

edited code
When the code run, the content of the result.json


result.json content
I have run this code for my photo and I leave my photo here so you can compare result.json and your thinks.

As you can see perfect! Not me 😁 the result is impeccable. This code is not only detecting faces at the same time analyzes the emotional status and facial features. 👌

This blog has been too long. Therefore, I will continue my next blog. I hope that I contributed or supported your knowledge. Kind regards 😎
Next Blog Here ➡️Amazon Rekognition With Nodejs Part 2
메타데이터
- post_id
- 9e8a9d23a342
- slug
- amazon-rekognition-with-nodejs-9e8a9d23a342
- url
- https://awstip.com/amazon-rekognition-with-nodejs-9e8a9d23a342
- canonical_url
- https://awstip.com/amazon-rekognition-with-nodejs-9e8a9d23a342
- author_url
- https://medium.com/@codercor
- status
- ok
- fetched_at
- 2026-06-17 19:05:49