Auto Launch EC2 instances using Face recognition method

B Manoj
2 min readJun 18, 2021

The code for this task is kept in

as Face Recognition.txt, Model training.txt, Collecting sample data.txt

Collecting Sample Data: Here , we take 100 samples of any image and store them as .jpg files in a particular location of PC.

Model training.txt: Here, we gonna use LBPH face recognition algorithm to make the model get trained with the image data that we collected previously.

Face Recognition.txt: Here, we gonna provide the sample image again to model for predicting image and if prediction confidence interval is greater than 80%, then we are gonna launch the ec2 instances in AWS.

Also launch 5gb EBS disk. Let’s see the output as below:

By using the “Collecting sample data”, I was able to collect 100 different pictures of mine as below:

Now, using the above data, I could train my model as shown below:

Now, as soon as my model predicts image, it is successful in predicting it. As the prediction is correct, so my program has launched ec2 instance. (Make sure you had configured aws in your local laptop).

An email is sent to gmail as follows:

One EBS of 5gb is also created

Also it is attached to ec2 instance which is created previously.

Stay Tuned Guys !!!

For more interesting stories

--

--