Skip to content

anandbaburajan/Multiple-Face-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiple Face Recognition

Train multiple images per person then recognize known faces in an image using a SVC in Python. One can easily use this to develop apps such as face-based attendance systems.

This program is based on ageitgey's face_recognition api for Python and dlib. A support vector classifier (SVC) with scikit-learn is trained on the face encodings from all the known faces in the training directory. It then recognizes the faces found in a test_image. Please note that it will produce meaningless results on very small datasets.

Installation

pip install -r requirements.txt

Usage

Usage:
  face_recognize.py -d <train_dir> -i <test_image>

Options:
  -h, --help                          Show this help
  -d, --train_dir=<train_dir>         Directory with images for training
  -i, --test_image=<test_image>       Test image

Training directory structure

<train_dir>/
    <person_1>/
        <person_1_face-1>.jpg
        <person_1_face-2>.jpg
        .
        .
        <person_1_face-n>.jpg
    <person_2>/
        <person_2_face-1>.jpg
        <person_2_face-2>.jpg
        .
        .
        <person_2_face-n>.jpg
    .
    .
    <person_n>/
        <person_n_face-1>.jpg
        <person_n_face-2>.jpg
        .
        .
        <person_n_face-n>.jpg

About

Train multiple images per person and get started with recognizing faces with the face_recognition API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages