Face Recognition and Automation using Python

Mohammed Adnan
2 min readAug 18, 2021



Objective :

To create a program that performs the given below tasks upon recognizing a particular face —

⭕ On recognizing the user’s face :
○ It sends an email to the user’s mail-id.
○ Send a Whatsapp message to one of the user's contacts.

⭕ On recognizing another face, it does the following :
○ Creates EC2 instance in the AWS.
○ Creates 5 GB EBS volume and attach it to the instance.

Developing and Training a Face recognition model

Haar Cascade Frontal Face Detector is Employed.

Preparing Dataset

Automating WhatsApp and E-mail

KNN code

Automating AWS EC2 instance launching


The model is trained to recognise faces by providing an appropriate database, when the face is recognized the program sends an email to the specified email and sends a WhatsApp message to the specified number also on recognising another face it launches an EC2 instance in AWS along with creating a 5 GB EBS volume and attaches it to the instance.