Giter Club home page Giter Club logo

cv-face-recognition's Introduction

CV: Face Recognition Application

Learns and identifies faces, with OpenCV and Python. Fully customizable and extendable.

General approach

The goal is to have an extendable face recognition application, that is easy to use and to customize. The algorithm should learn continuously known faces and save additional training or validation sets for retraining the model and enhancing the accuracy.

Clone / Install

  1. Clone the git repository with the submodules. If you're working with the Terminal, here's the convenient code for you:
git clone --recursive https://github.com/n1g1r1/cv-face-recognition
  1. Switch into cloned project folder and install necessary dependencies:
cd cv-face-recognition && pip install -r requirements.txt
  1. Run the python script:
python main.py

.. or if you're that kind of person, here's a convenient one-liner:

git clone --recursive https://github.com/n1g1r1/cv-face-recognition && cd cv-face-recognition && pip install -r requirements.txt && python main.py

The application comes with a handy default config.yml file with default values. Check this file out and customize it if you want. You can also make multiple config files for your purposes and change the config file name in main.py.

Usage

Call the script with

python main.py

You can customize the settings of the application by editing the config.yml file.

The config.yml

# General settings
general:
    face_classifier:    'haar' # Choose: lbp, haar
    recognizer:         'lbp' # Choose: lbp, eigen, fisher
    identifier_method:  'local' # Choose: local, remote
    capture_faces:      True
    train_model:        False
    classify:           True
    resize_factor:      0.5

# Training
training:
    set_path:         'data/training'
    number_of_images: 20
    resize:           False
    model_path:       'model'
    model_filename:   'LBPHData.xml'

# Validation
validation:
    make_set:         False
    set_path:         'data/validation'
    number_of_images: 20

# Test set
test:
    make_set:         True
    set_path:         'data/test'

# Server configuration for classification
server:
    url:              '' # Trailing slash
    classify:         ''
    train:            ''
    update:           ''

To detect faces in general, you can choose between two classifiers at face_classifier:

To train and recognize the algorithm locally, you can choose between those three options at recognizer:

You can even have your own remote recognizer that returns a JSON formatted label and confidence value. If so, fill in an url to the server, as well as the paths to the classify, train and update API interface in the server section. For example, you might have the server address http://recognize.faceidentifier.io, so you might fill in the section like the following:

# Server configuration for classification
server:
    url:              'http://recognize.faceidentifier.io/' # Trailing slash
    classify:         'classify'
    train:            'model/train'
    update:           'model/update'

You might want to also customize the classifier_online module to even match more your needs.

More information:

cv-face-recognition's People

Contributors

dependabot[bot] avatar xu-chris avatar

Watchers

 avatar  avatar  avatar

cv-face-recognition's Issues

Add face image upload

As a developer, I want to upload new face images to the cloud to update the remote training set.

Add trigger remote training

As a developer, I also want to trigger the remote training after the algorithm has uploaded new face images to the cloud to keep it up to date.

Might also need an API with update and status post returns.

Add continuous learning

As an user, I want that the recognition algorithm conitnue to learn my face while I am using it to increase recognition precision.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.