Using Face Recognition to send a mail ?? , WhatsApp ?? and launching AWS instance ??
Nehal Ingole
Jr React Developer at Kshan Tech Soft Pvt Ltd || DevOps | Full Stack Development | CICD | React Native
So In this task we are using the Face Recognition model to recognize someone's Face and after that we will ask the model to send a WhatsApp message to some friend's number, email to someone. for making this task more interesting we will Create one more model to recognize another person face. after there face is recognize we will ask the model to launch AWS ec2 instance via a terraform code.
Here for creating the face Recognition model we will be using LBPH (Local Binary Patterns Histogram) Algorithm. It is based on local binary operator. It is widely used in facial recognition due to its computational simplicity and discriminative power.
Task Description
?Create a program that perform below mentioned task upon recognizing a particular face.
???When it recognize your face then -
???It send mail to your mail id by writing this is face of your_name.
???Second it send whatsapp message to your friend, it can be anything.
???When it recognize second face, it can be your friend or family members face.
???Create EC2 instance in the AWS using CLI.
But lets us first discuss about Face recognition
What is facial recognition?
Facial recognition is a way of identifying or confirming an individual’s identity using their face. Facial recognition systems can be used to identify people in photos, videos, or in real-time.
Facial recognition is a category of?biometric security. Other forms of biometric software include voice recognition, fingerprint recognition, and eye retina or iris recognition. The technology is mostly used for security and law enforcement, though there is increasing interest in other areas of use.
How does facial recognition work?
Many people are familiar with face recognition technology through the FaceID used to unlock iPhones (however, this is only one application of face recognition). Typically, facial recognition does not rely on a massive database of photos to determine an individual’s identity — it simply identifies and recognizes one person as the sole owner of the device, while limiting access to others.
Beyond unlocking phones, facial recognition works by matching the faces of people walking past special cameras, to images of people on a watch list. The watch lists can contain pictures of anyone, including people who are not suspected of any wrongdoing, and the images can come from anywhere — even from our social media accounts.
So lets do the pratical
Step 1
Lets Collect the Data at the most. here we are collecting 100 images of both the person using the code ..
Sample collect
Step 2 :-
Train the model
So below code collect all the sample from the "Nehal" folder and use to train a Machine
SO lets run the code
SO you can see the model trained successfully.
Step 3
In this step we are going to run actual or main code which automatically recognize the person and launch EC2 instances and sent whatsapp messages and mail to the person
领英推è
so our model run successfully and it will recognize us successfully
For sending the message I have use Pywhatkt library it will sent your whatsapp message.
but it have one problem we have to give set a time before running the model
for more update you can use this link :- https://www.geeksforgeeks.org/introduction-to-pywhatkit-module/
WhatsApp Message
AWS INSTANCES
This is simplest thing so basically we can use terraform or other any idea for running the instances but i have use a simple technique i.e AWS CLI (command line) it will launch instances. only we have to give aws user ID
You can refer this article for more information
https://www.dhirubhai.net/pulse/aws-console-managing-via-cli-nehal-ingole
Running this command before running the main model
AWS USER
I have already done this task before running the model then it will launch the instances
Creating a key-pair so launching the instances.
so after providing all the information only then run the main model
Instance Launch Successfully
And also the volume created and attach to the instance
So we successfully completed our task
Thanks Guys!!
Software Engineer@Principal Global Services | 1xAWS Certified | 1xMicrosoft Certified | 1xOracle Certified | AWS | Azure | Docker | K8s | Ansible
3 å¹´Worked well Nehal!!????