FaceFinder
TABLE OF CONTENTS
About The Project
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
-
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.
-
Clone the repo:
git clone https://github.com/BleepLogger/FaceFinder
Clone the repository by its URL.
-
Navigate to cloned repository:
cd FaceFinder
Commands that you run should be run within the cloned repository.
-
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 and 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 and 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:
- Create a directory called
dataset/
in the FaceFinder directory in ~. - Create two subdirectories,
dataset/mom
anddataset/dad
. - Add images of your mother to the mom subdir and your father to your dad subdir.
- 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. - 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.
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Kanav Bhasin - @kanav_bhasin - [email protected]
Project Link: https://github.com/BleepLogger/FaceFinder
# Thank you!