k-NN is one of the most basic classification algorithms in machine learning. It belongs to the supervised learning category of machine learning. k-NN is often used in search applications where you are looking for “similar” items. The way we measure similarity is by creating a vector representation of the items, and then compare the vectors using an appropriate distance metric (like the Euclidean distance, for example).
It is generally used in data mining, pattern recognition, recommender systems and intrusion detection.
Libraries used are:
haarcascade_frontalface_default.xml dataset which is easily available online and also you can download it from this link.
scikit-learn provides a range of supervised and unsupervised learning algorithms via a consistent interface in Python.
This library is built upon SciPy that must be installed on your devices in order to use scikit_learn.
This includes three Python files where the first one is used to detect the face and storing it in a list format, second one is used to store the data in ‘.csv’ file format and the third one is used recognize the face.
npwriter.py – Create/Update ‘.csv’: file
recog.py – Face-recognizer
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Face Comparision Using Face++ and Python
- Python | Multiple Face Recognition using dlib
- Python | Face recognition using GUI
- ML | Face Recognition Using PCA Implementation
- ML | Face Recognition Using Eigenfaces (PCA Algorithm)
- Face recognition using Artificial Intelligence
- Deep Face Recognition
- ML | Implementation of KNN classifier using Sklearn
- ML | Kaggle Breast Cancer Wisconsin Diagnosis using KNN and Cross Validation
- IBM HR Analytics Employee Attrition & Performance using KNN
- Implementation of KNN using OpenCV
- Introductory guide to Information Retrieval using KNN and KDTree
- KNN Model Complexity
- Face Detection using Python and OpenCV with webcam
- OpenCV - Facial Landmarks and Face Detection using dlib and OpenCV
- How to create a Face Detection Android App using Machine Learning KIT on Firebase
- Draw a happy face using Arcade Library in Python
- Draw smiling face emoji using Turtle in Python
- Speech Recognition in Python using Google Speech API
- Google Chrome Dino Bot using Image Recognition | Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.