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
- Python | Face recognition using GUI
- ML | Face Recognition Using PCA Implementation
- Deep Face Recognition
- ML | Face Recognition Using Eigenfaces (PCA Algorithm)
- Python | Multiple Face Recognition using dlib
- Face Comparision Using Face++ and Python
- ML | Unsupervised Face Clustering Pipeline
- Face Detection using Python and OpenCV with webcam
- Opencv Python program for Face Detection
- Pattern Recognition | Introduction
- Applications of Pattern Recognition
- FaceNet - Using Facial Recognition System
- Food Recognition Selenium using Caloriemama API
- Python | Named Entity Recognition (NER) using spaCy
- Pattern Recognition | Basics and Design Principles
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.