Create a Program that Perform Different Tasks upon Recognizing a particular face.
Task Description:
When it recognize your first 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.
→ Create 5 GB EBS volume and attach it to the instance.
Solution:
Here This Task we have used LBPH Face Recognition Algo:
Human beings perform face recognition automatically every day and practically with no effort.
Although it sounds like a very simple task for us, it has proven to be a complex task for a computer, as it has many variables that can impair the accuracy of the methods, for example: illumination variation, low resolution, occlusion, amongst other.
In computer science, face recognition is basically the task of recognizing a person based on its facial image. It has become very popular in the last two decades, mainly because of the new methods developed and the high quality of the current videos/cameras.
Note that face recognition is different of face detection:
- Face Detection: it has the objective of finding the faces (location and size) in an image and probably extract them to be used by the face recognition algorithm.
- Face Recognition: with the facial images already extracted, cropped, resized and usually converted to grayscale, the face recognition algorithm is responsible for finding characteristics which best describe the image.
Now for task we have to collect image samples of the face and we can take help from face detection using haarcascade model.
Here I have GitHub link: https://github.com/yashdwi05/mail_sms_awsresource_by_face_login.git
Sample Collecting:
command to run code
$python LBPH_Sample_Collecting.py
This code Detect face, crop it and convert images to gray images and save to the dataset folder.
Training Model and Performing Task:
command to run code
$python User_Face_Rek_Login.py
This python code Train model for two users and after it it will detect faces and as soon as faces detect by model it will perform some tasks.
Now it will detect face and when first user as yash detected it will send mail and sms to Author’s Contacts. Here we have some samples
Here all the things are working well.
Now if the second face detected it will send a mail and launch ec2 instance on aws cloud, also it will create and attach 5gb volume to ec2 instance.
Here we can see volume is connected to ec2 instance.
Thanks For Reading!!