FaceFinder

screenshot

There is lots of face recognition software out there on github, but most of it focuses on speed over accuracy and uses models such as 'hog'. However, FaceFinder is one of the most powerful face recognition programs which uses a very large CNN to make accurate predictions.

Here's why:

  • Several modern technologies make use of face recognition and its importance in the world is constantly increasing.
  • You shouldn't have to train a full neural net of your own every time you want to perform face recognition.
  • FaceFinder contains code which runs approximately 3.7 times faster than average.

If you're making an app of your own and want it to perform face recognition, this is your go-to option.

A list of commonly used resources that I find helpful are listed in the acknowledgements.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Latest versions of pip and setuptools
    pip install --upgrade pip setuptools
    
  • Conda
    pip install conda
    
  • Dlib
    python -m conda install dlib
    
  • Required packages
    pip install -r requirements.txt
    

Installation

  1. Ensure you're in your home directory:

    cd ~
    

    When you clone the repository it should show up as a subfolder in your home folder. You can change its location whenever you want.

  2. Clone the repo:

    git clone https://github.com/BleepLogger/FaceFinder
    

    Clone the repository by its URL.

  3. Navigate to cloned repository:

    cd FaceFinder
    

    Commands that you run should be run within the cloned repository.

  4. To run the program, execute tasks.py with command line arguments:

    python Scripts/tasks.py --data-dir '<data folder path>' --input_image '<path to image>'
    

    Replace the <data folder path> and <path to image> with the real paths. They're just placeholders.

Usage

To run it from the command line, you will need to pass two arguments.

python Scripts/tasks.py --data-dir '<data folder path>' --input_image '<path to image>'

Replace the <data folder path> and <path to image> with the real paths.

This program needs one directory containing different images labelled with whose face is present in the image. And then, you need an input image which will be classified.

So if you want to check whether an image is an image of your mom or your dad, then this is how you could do it:

  1. Create a directory called dataset/ in the FaceFinder directory in ~.
  2. Create two subdirectories, dataset/mom and dataset/dad.
  3. Add images of your mother to the mom subdir and your father to your dad subdir.
  4. Click an image of either your mom or your dad, the one you want to classify. Title it 2bclassified.jpg and put it in the FaceFinder directory.
  5. Run this command:
    python Scripts/tasks.py --data-dir 'dataset/' --input_image '2bclassified.jpg'
    

Then, after about 20 minutes of processing (6-7 if you have a GPU), a window will open up displaying your image, with a box highlighting the detected face and a box of text saying either "Mom" or saying "Dad".

You will have to install dlib from source if you want your GPU to be utilized. Look up the instructions to do that.

GitHub

https://github.com/BleepLogger/FaceFinder