All Projects → dpacassi → face-detection

dpacassi / face-detection

Licence: MIT license
Comparing different Face detection solutions from Amazon, Google, IBM, Microsoft, Dlib, OpenCV and other open source solutions.

Programming Languages

PHP
23972 projects - #3 most used programming language
python
139335 projects - #7 most used programming language

Face detection - An overview and comparison of different solutions

This repository holds the implementation of the face detection solutions listed in my blog posts.

How does this work?

All face detection implementations are stored in the /src/solutions folder. If you want to run the face detection code yourself, read the relevant README.md file located in each solution's folder.

Custom classes

To add meta information to the images and generate a CSV export, following two classes have been written:

In order to execute shell commands to find faces, following class has been written:

Where's what?

  • Dataset with images to be processed: /dataset
  • Information about how many faces to expect per image in the dataset (to calculate the success rate): /dataset/face_counts.ini
  • Processed datasets with metadata on the images: /dataset-output
  • CSV file with analytical data: /dataset-output/results.csv
  • Implementation of each solution: /src/solutions/<solution>
  • Custom classes: /src/solutions

Important: The dataset-solutions folder has been added to .gitignore in order not to blow up the Git repository size.
In case you're interested to see the processed images used in my blog posts, you can download the complete set from our file server.

Installation

As stated above, the code for each face detection solution can be found in the /src/solutions folder. If you want to run the code locally, please read the corresponding README.md file located in the /src/solutions sub folders.

SaaS vendors

Open source options

CSV Export

Each solution run checks if a /dataset-output/results.csv file exists. If so, it will attach it's data to this CSV file. If not, it will create the file with the corresponding headers.

Dataset

The face detection solutions will try to find faces in all images in the /dataset directory.
You can extend the images or replace them with your own, as you wish.
Important: Only JPG and PNG images are supported for now!

All images currently stored in the /dataset directory were downloaded from pexels.com, many thanks to the contributors and photographers of the images and also to Pexels!

Downloaded images

Contribution

Want to extend the listed solutions or simply enhance existing code?
I'm happy to receive and accept pull requests!

License

MIT License

Copyright (c) 2018 David Pacassi Torrico

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].