Face Detection with Python using OpenCV

WL Date 15–06–2021 Task -06

This task is completed by Sandeep Kumar Patel

Recognizing a Particular Face

Face recognition is a method of identifying or verifying the identity of an individual using their face. Face recognition systems can be used to identify people in photos, video, or in real-time.

Computer Vision is an AI based, that is, Artificial Intelligence based technology that allows computers to understand and label images.

Face detection is a computer vision technology that helps to locate/visualize human faces in digital images. This technique is a specific use case of object detection technology that deals with detecting instances of semantic objects of a certain class (such as humans, buildings or cars) in digital images and videos. With the advent of technology, face detection has gained a lot of importance especially in fields like photography, security, and marketing.

Face Detection with Python using OpenCV

This tutorial will introduce you to the concept of object detection in Python using OpenCV library and how you can utilize it to perform tasks like Facial detection.

Pre-requisites

Hands-on knowledge of Numpy and Matplotlib is essential before working on the concepts of OpenCV. Make sure that you have the following packages installed and running before installing OpenCV

  • run pip install opencv-python if you need only main modules
  • run pip install opencv-contrib-python if you need both main and contrib modules (check extra modules listing from OpenCV documentation)

Face detection using Haar cascades is a machine learning based approach where a cascade function is trained with a set of input data. OpenCV already contains many pre-trained classifiers for face, eyes, smiles, etc.. Today we will be using the face classifier. You can experiment with other classifiers as well.

What is AWS CLI?

The AWS CLI is an open source tool built on top of the AWS SDK for Python that provides commands for interacting with AWS services. Once set up, you can use the CLI to access all the functionality provided on the AWS Management Console to access AWS services and configure resources.

You can use one of the following terminal programs for CLI:

  • Linux shells: Use common shell programs such as Bash, run commands in Linux, Mac OS, or Unix.
  • Windows command line: On Microsoft Windows, run commands in either PowerShell or the Windows Command Processor.
  • Remotely: Run commands on Amazon EC2 instances through a remote terminal such as PuTTY or SSH, or with Amazon EC2 systems manager.

With AWS CLI you can simplify many multi-step processes using one command, and also automate repetitive tasks. For example, you can accomplish the following very easily and quickly using the AWS CLI versus using the AWS Management Console.

  • Sync all files from one s3 bucket to another s3 bucket, while also removing the ones that are deleted.
  • Get the list of all IAM users in your AWS account who access a specific bucket prefix.
  • Terminate all EC2 instances in your AWS account that are launched with a specific key pair.

Key Features of AWS CLI:

  • Manage all AWS resources using a single tool.
  • Simple Configuration.
  • Easy to use, and can combine with other scripting languages.

AWS EC2 (Elastic Cloud Compute):

Get the description of all EC2 instances:

aws ec2 describe-instances

Get the description of a specific EC2 instance:

aws ec2 describe-instances --instance-ids i-1234567890###

AWS IAM (Identity and Access Management):

List all the IAM users in the current AWS account:

aws iam list-users

Get information about am IAM user in the AWS account:

aws iam get-user Sandeep

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.

👉 Create 5 GB EBS volume and attach it to the instance.

1.Program that Perform Recognizing a Particular Face

Thank YOU ….!!!

Enthusiastic, aspirant in artificial intelligence, machine learning Research is formalized curiosity. It is poking and prying with a purpose.