Face Recognition using KNN

2 1
  • 0 Collaborators

k-NN is one of the foremost basic classification algorithms in machine learning. It belongs to the supervised learning class of machine learning. k-NN is usually employed in search applications wherever you're searching for “similar” things. ...learn more

Project status: Published/In Market

Artificial Intelligence, Graphics and Media

Intel Technologies
Intel Python

Code Samples [1]

Overview / Usage

k- Nearest Neighbour

k-NN is one of the foremost basic classification algorithms in machine learning. It belongs to the supervised learning class of machine learning. k-NN is usually employed in search applications wherever you're looking for “similar” things. The way we measure similarity is by making a vector illustration of the things, and then compare the vectors using an acceptable distance metric (like the geometrician distance, for example).

It is typically utilized in data processing, pattern recognition, recommender systems and intrusion detection.

Dataset used:

We used haarcascade_frontalface_default.xml dataset that is well accessible online and additionally you'll be able to download it.

Scikit-learn:

scikit-learn provides a variety of supervised and unattended learning algorithms via a consistent interface in Python.

This library is made upon SciPy that has to be installed on your devices so as to use scikit_learn.

Face-Recognition :

This includes 3 Python files where the primary one is employed to detect the face and storing it in a list format, second is employed to store the info in ‘.csv’ file format and the third one is employed recognize the face.

Methodology / Approach

Step 1: Detect Face

First of all, we'll generates face patterns based on the HOG algorithmic program.

We will notice the a part of the simplified pictures that look the most similar to an original known HOG face pattern.

Finaly, a bounding box is drawn around the detected face

Step 2: Get 68 points and an adjusted face

   2A: The face landmark estimation algorithmic program are going to be accustomed to figure out sixty eight specific points that exists on each faces.

    2B: From the found landmarks, OpenCV ‘s affine transformation can use some basic image transformations like rotation, scale and shear to try to create the eyes and lip always appear in the same location on every image.

Step 3: Get 128 measurements

The targeted face pictures are passed through a deep convolution neural network to get 128 measurements that is 128 dimensional unit hyper-sphere.

Step four : Apply Machine Learning algorithmic program

In this final step, apply your favorite algorithmic program for clustering, similarity detection, classification. Since we are using face recognition, classification is our path.

Because we use K-Nearest Neighbor to train our classifier, i will be able to introduce the most concepts of this algorithmic program.

K-Nearest Neighbor

KNN algorithmic program is among one of the only algorithmic program for regression and classification in supervised learning.

KNN is non-parametric which suggests it doesn't create any assumptions however bases on the model structure generated from the data.

KNN is termed memory-based or lazy learning as a result of the way it learns is just storing the representations of the training examples.

An object is classified based on the majority votes of its neighbors (the training set). The new example object are going to be assigned to the category with its most similar k nearest neighbors

Technologies Used

It is generally used in data mining, pattern recognition, recommender systems and intrusion detection.

I have used python software to code//

Following are list of libraries used:

OpenCV2
Pandas
Numpy
Scikit-learn

I have used my laptop camera for obtaining images and feed it to the dataset in .npy format.

We can use external camera like logitech c310 webcam and interface it with Raspberry Pi to create an easy to use handy tool.

Repository

https://github.com/Tanvesh-11/Face_Recog

Comments (1)