Skip to content

Face Recognition made in Machine Learning using KNN algorithm and OpenCV

Notifications You must be signed in to change notification settings

Pranavjain23/Face-Recognition-using-KNN-openCV

Repository files navigation

Face-Recognition-using-KNN-openCV

Introduction

Face recognition is a crucial security application. Through this project, a very basic form of face recognition has been implemented using the Haar Cascades Classifier, openCV & K-Nearest Neighbors Algorithm.

Face-Recognition

Face Recognition using KNN algorithm and open cv for python.

Technology Stack

Python - The whole code has been written in Python cv2 - cv2 is the OpenCV module and is used here for reading & writing images & also to input a video stream Algorithm - KNN Classifier - Haar Cascades

Breakdown of the code for KNN classifier

1. Importing libraries
2. Create some data for classification
3. Write the kNN workflow
4. Finally, run knn on the data and observe results

Dependencies

Python 2.7 and OpenCv

How it works!

  • Run generating selfie training data.ipynb.The script will open a camera window.Stand in front of the camera until recording of the face is completed.Input the person's name. Press q after having enough samples.
  • The default file where the features are stored is name.npy.
  • Run the Building Face Classifier.ipynb file!

Copyright (c) 2020 Pranav-Jain

About

Face Recognition made in Machine Learning using KNN algorithm and OpenCV

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published