manhminno / Face-Recognition

Face recognition - realtime recognition by tf2
2 stars 1 forks source link
face-matching face-recognition-python facenet mtcnn

Face Recognition - Realtime Recognition

Table of Contents

1. Introduction

2. Requirement

3. Usage

4. Reference


1. Introduction

  • Face recognition is a technology capable of matching a human face from a digital image or a video frame against a database of faces, typically employed to authenticate users through ID verification services, works by pinpointing and measuring facial features from a given image.
  • Recognize and manipulate faces with Python and its support libraries. The project uses MTCNN for detecting faces, then applies a simple alignment for each detected face and feeds those aligned faces into embeddings model (Facenet). Finally, a softmax classifier and cosine similarity method was put on top of embedded vectors for classification task.

2. Requirement

  • Tensorflow-gpu (2.1.0)
  • Python 3.7+
  • Keras 2.2.4
  • OpenCV-python (4.4.0)
  • Pip or anaconda

    Install MTCNN:

    pip install mtcnn (for pip)
    conda install -c conda-forge mtcnn (for conda)

3. Usage

Crawl data:

python src/save_data.py --name (name of save_dir)

Make sure your computer has a webcam

Preprocessing:

Label is name of saved-dir - box is green, unknown will don't have label - box is red. Here label is id of person.

4. Reference