Skip to main content

A system for experimenting with face recognition

Project description

Face Recognition Project

A gentle exploration of Deep Learning in the context of Face Recognition.

Table of Contents

  1. Getting Started
  2. Folders Description
  3. Usage
  4. Resources
  5. Acknowledgements

Getting Started

Installation

$ pip install pipenv 
$ pipenv install

$ pipenv shell

Folders Description

frsystem

Contains a program designed as a system for experimenting with face recognition.

MaskFaceRecognition

Contains a jupyter notebook that covers experiments with transfer learning to determine the best model in terms of face mask detection, and a program that uses the system from FaceRecognition folder to classify a face mask in real time.

Contains a program that uses the system from FaceRecognition folder combined with the best face mask model from MaskRecognition to detect a face mask or name of the person (if known to the system) not wearing a face mask.

Usage Example

1. Add Faces to database of known faces

Adding known faces to the database that the system will recognize is possible through the following two methods:

  1. Manual

    1. Camera - adding a known face through the webcam

      When webcam window pops up, hit ENTER to take a picture of your face.

      Hit ESC to quit.

    2. File - adding a known face from a .jpg file

  2. Folder Loop

    The following directory structure is required to process images through a folder loop. For accurate face recognition add at least 5 images per person.

    jpg/
       Elon Musk/
          - face1.jpg # image names can be anything
          - face2.jpg
          - face3.jpg
          - face4.jpg
          - face5.jpg
       Johnny Ive/
          - face1.jpg
    	...
          - face5.jpg
    

Example with folder loop

$ python3 add_faces.py

$ add faces to database manually or through folder loop? type '1' or '2': 2

$ Embeddings added to database.

2. Recognize known faces

After running the command below, the webcam window will pop up and display frames with detected face identities. If the person in the camera was not added to the database, it will say "Unknown".

$ python3 MaskFaceRecognition/face_recognizer.py

Face Recognizer Example

3. Recognize face masks

Running the following command will display a webcam window with detected face masks ("Mask"/"No Mask").

$ python3 MaskFaceRecognition/mask_recognizer.py

Face Recognizer Example

4. Recognize face masks or known faces

Running the following command will display a webcam window with detected face masks. If a face mask is not present on the face, it will detect person's name if known, otherwise "Unknown" label will be displayed.

$ python3 MaskFaceRecognition/mask_face_recognizer.py

Mask Face Recognizer Example

Resources

DataCamp

Introduction to Python for Data Sceince

Manipulating Data Frames with pandas

Data Types for Data Science in Python

Intermediate Python

Image Processing with Keras

Introduction to Deep Learning with Keras

Advanced Deep Learning with Keras

Readings

Modern Face Recognition with Deep Learning

Illustrated: 10 CNN Architectures

A Comprehensive Hands-on Guide to Transfer Learning with Real-World Applications in Deep Learning

Tutorials

Face Detection with Open CV

ImageNet: VGGNet, ResNet, Inception, and Xception with Keras

How to Configure Image Data Augmentation in Keras

Face Mask Detector with OpenCV, Keras/TensorFlow, and Deep Learning

Acknowledgements

This project is a part of James Rocco Research Scholarship provided by Lake Forest College and was carried out under the supervision of Prof. Arthur Bousquet PhD.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frsystem-1.0.0.tar.gz (38.9 kB view hashes)

Uploaded Source

Built Distribution

frsystem-1.0.0-py3-none-any.whl (11.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page