Need help with face-identification-tpe?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

meownoid
208 Stars 76 Forks MIT License 19 Commits 0 Opened issues

Description

Face identification with CNN + TPE using Keras

Services available

!
?

Need anything else?

Contributors list

# 100,417
Python
Keras
machine...
rbm
19 commits

Face identification using CNN + TPE

NOTE: This repository is archived and will no longer be updated.

This repository contains an implementation of the Triplet Probabilistic Embedding for Face Verification and Clustering paper.

demo application screenshot

Installation

shell script
git clone https://github.com/meownoid/face-identification-tpe.git
cd face-identification-tpe
python -m pip install -r requirements.txt

Usage

NOTE: Pre-trained model was trained using very small dataset and achieves poor performance. It can't be used in any real-world application and is intended for education purposes only.

To start application with the pre-trained weights download all assets and put them to the

model
directory (default path) or to the any other directory.

Then you can start the application.

shell script
python application.py

If you placed assets to the other directory, specify path with the

--model-path
argument.

shell script
python application.py --model-path /path/to/assets/

Training

NOTE: Training code was written a long time ago and have a lot of hard-coded constants in it. Using it now on new dataset will be very difficult, so please, don't try. You can read it and use it as a reference or you can just use CNN and TPE definitions and write custom training code.

I'm leaving this here just for the sake of history.

  1. Download assets

    face_template.npy
    and
    shape_predictor_68_face_landmarks.dat
    from here and put them to the
    model
    dir.
  2. Place train, test and evaluation (named

    dev
    ) data to the
    data
    folder using following structure.
    data\
    dev\
        person_0\
            1.jpg
            2.jpg
            ...
        person_1\
            1.jpg
            2.jpg
            ...
        ...
    test\
        person_0\
            1.jpg
            2.jpg
            ...
        person_1\
            1.jpg
            2.jpg
            ...
        ...
    train\
        person_0\
            1.jpg
            2.jpg
            ...
        person_1\
            1.jpg
            2.jpg
            ...
        ...
    

All images in the

person_{i}
folder inside
train
and
test
directories must contain faces of the same person.
  1. Run
    python 0_load_data.py
  2. Train the CNN with
    python 1_train_cnn.py
  3. Optionally test the CNN with
    python 2_test_cnn.py
  4. Train the TPE with
    python 3_train_tpe.py
  5. Optionally test the TPE with
    python 4_test_tpe.py

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.