{"id":16362292,"url":"https://github.com/dpacassi/face-detection","last_synced_at":"2026-03-07T03:01:54.327Z","repository":{"id":90609629,"uuid":"144851741","full_name":"dpacassi/face-detection","owner":"dpacassi","description":"Comparing different Face detection solutions from Amazon, Google, IBM, Microsoft, Dlib, OpenCV and other open source solutions.","archived":false,"fork":false,"pushed_at":"2018-11-11T20:12:45.000Z","size":62993,"stargazers_count":49,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T15:48:03.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpacassi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-15T12:43:36.000Z","updated_at":"2024-11-18T17:49:16.000Z","dependencies_parsed_at":"2023-03-13T22:46:28.163Z","dependency_job_id":null,"html_url":"https://github.com/dpacassi/face-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dpacassi/face-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpacassi%2Fface-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpacassi%2Fface-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpacassi%2Fface-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpacassi%2Fface-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpacassi","download_url":"https://codeload.github.com/dpacassi/face-detection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpacassi%2Fface-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T02:23:49.131Z","updated_at":"2026-03-07T03:01:54.310Z","avatar_url":"https://github.com/dpacassi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face detection - An overview and comparison of different solutions\nThis repository holds the implementation of the face detection solutions listed in\nmy blog posts.\n- [Part 1: SaaS vendors](https://www.liip.ch/en/blog/face-detection-an-overview-and-comparison-of-different-solutions-part1)\n- Part 2: Open source options\n\n## How does this work?\nAll face detection implementations are stored in the `/src/solutions` folder.\nIf you want to run the face detection code yourself, read the relevant `README.md` file located\nin each solution's folder.\n\n### Custom classes\nTo add meta information to the images and generate a CSV export, following two classes have been written:\n- [FaceDetectionClient](src/FaceDetectionClient.php)\n- [FaceDetectionImage](src/FaceDetectionImage.php)\n\nIn order to execute shell commands to find faces, following class has been written:\n- [FaceDetectionShell](src/FaceDetectionShell.php)\n\n## Where's what?\n- Dataset with images to be processed: `/dataset`\n- Information about how many faces to expect per image in the dataset (to calculate the success rate): `/dataset/face_counts.ini`\n- Processed datasets with metadata on the images: `/dataset-output`\n- CSV file with analytical data: `/dataset-output/results.csv`\n- Implementation of each solution: `/src/solutions/\u003csolution\u003e`\n- Custom classes: `/src/solutions`\n\n**Important:** The `dataset-solutions` folder has been added to `.gitignore` in order not to blow up the Git repository size.  \nIn case you're interested to see the processed images used in my blog posts, you can download the complete set\nfrom our [file server](https://file.ac/TkwCldonZl0/).\n\n## Installation\nAs stated above, the code for each face detection solution can be found in the `/src/solutions` folder.\nIf you want to run the code locally, please read the corresponding `README.md` file located in the\n`/src/solutions` sub folders.\n\n### SaaS vendors\n- [Amazon Rekognition](src/solutions/amazon-rekognition)\n- [Google Cloud Vision API](src/solutions/google-cloud-vision-api)\n- [IBM Watson Visual Recognition](src/solutions/ibm-watson-visual-recognition)\n- [Microsoft Face API](src/solutions/microsoft-azure-face-api)\n\n### Open source options\n- [Ageitgey - Face Recognition](src/solutions/ageitgey-face_recognition)\n- [Dlib - CNN](src/solutions/dlib-cnn)\n- [Dlib - HOG](src/solutions/dlib-hog)\n- [OpenCV - Deep learning](src/solutions/opencv-deep-learning)\n- [OpenCV - Haar](src/solutions/opencv-haar)\n- [OpenCV - Haar (tweaked)](src/solutions/opencv-haar-tweaked)\n- [OpenCV - LBP](src/solutions/opencv-lbp)\n\n## CSV Export\nEach solution run checks if a `/dataset-output/results.csv` file exists.\nIf so, it will attach it's data to this CSV file. If not, it will create the file with the corresponding headers.\n\n## Dataset\nThe face detection solutions will try to find faces in all images in the `/dataset` directory.  \nYou can extend the images or replace them with your own, as you wish.  \n**Important:** Only JPG and PNG images are supported for now!\n\nAll images currently stored in the `/dataset` directory were downloaded from [pexels.com](https://www.pexels.com/),\nmany thanks to the contributors and photographers of the images and also to Pexels!\n\n### Downloaded images\n- [9746](https://www.pexels.com/photo/selfie-family-generation-father-9746/)\n- [9816](https://www.pexels.com/photo/people-crowd-walking-9816/)\n- [34692](https://www.pexels.com/photo/crowd-music-musician-street-performer-34692/)\n- [109919](https://www.pexels.com/photo/people-brasil-guys-avpaulista-109919/)\n- [163087](https://www.pexels.com/photo/couple-standing-next-to-each-other-163087/)\n- [167637](https://www.pexels.com/photo/man-in-black-crew-neck-shirt-holding-a-black-electric-guitar-167637/)\n- [211050](https://www.pexels.com/photo/man-sitting-next-to-couple-of-person-walking-on-the-street-during-daytime-211050/)\n- [233129](https://www.pexels.com/photo/architecture-buildings-business-establishment-city-233129/)\n- [267885](https://www.pexels.com/photo/accomplishment-ceremony-education-graduation-267885/)\n- [280002](https://www.pexels.com/photo/army-authority-drill-instructor-group-280002/)\n- [307847](https://www.pexels.com/photo/portrait-of-man-on-city-street-307847/)\n- [325521](https://www.pexels.com/photo/group-of-people-enjoying-music-concert-325521/)\n- [356147](https://www.pexels.com/photo/adult-anger-art-black-background-356147/)\n- [403448](https://www.pexels.com/photo/adult-black-and-white-close-up-dandelion-403448/)\n- [428364](https://www.pexels.com/photo/adult-businessman-close-up-corporate-428364/)\n- [546162](https://www.pexels.com/photo/beautiful-creative-daylight-enjoyment-546162/)\n- [687501](https://www.pexels.com/photo/monochrome-photography-of-a-person-687501/)\n- [708392](https://www.pexels.com/photo/group-of-people-having-fun-together-under-the-sun-708392/)\n- [711009](https://www.pexels.com/photo/group-of-people-reading-book-sitting-on-chair-711009/)\n- [745045](https://www.pexels.com/photo/group-of-people-sitting-on-white-mat-on-grass-field-745045/)\n- [761963](https://www.pexels.com/photo/photography-of-woman-listening-to-music-761963/)\n- [787961](https://www.pexels.com/photo/photo-of-women-wearing-masks-787961/)\n- [837306](https://www.pexels.com/photo/shallow-focus-photography-of-man-wearing-eyeglasses-837306/)\n- [840996](https://www.pexels.com/photo/man-in-white-dress-shirt-sitting-on-black-rolling-chair-while-facing-black-computer-set-and-smiling-840996/)\n- [889545](https://www.pexels.com/photo/group-of-people-on-road-with-assorted-color-smokes-889545/)\n- [914181](https://www.pexels.com/photo/people-gathered-in-room-having-a-party-914181/)\n- [923657](https://www.pexels.com/photo/four-men-sitting-on-platform-923657/)\n- [933964](https://www.pexels.com/photo/group-of-friends-hanging-out-933964/)\n- [948199](https://www.pexels.com/photo/woman-wearing-red-shirt-drinking-948199/)\n- [1116302](https://www.pexels.com/photo/group-of-people-forming-star-using-their-hands-1116302/)\n- [1117256](https://www.pexels.com/photo/crowd-of-people-gathering-during-golden-hour-1117256/)\n- [1181562](https://www.pexels.com/photo/woman-in-gray-formal-coat-sitting-near-black-full-glass-panel-window-1181562/)\n- [1185440](https://www.pexels.com/photo/group-of-people-standing-waiting-outside-the-bar-1185440/)\n\n## Contribution\nWant to extend the listed solutions or simply enhance existing code?  \nI'm happy to receive and accept pull requests!\n\n## License\n```\nMIT License\n\nCopyright (c) 2018 David Pacassi Torrico\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpacassi%2Fface-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpacassi%2Fface-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpacassi%2Fface-detection/lists"}