{"id":18578333,"url":"https://github.com/astrotomic/php-deepface","last_synced_at":"2025-09-24T13:31:50.089Z","repository":{"id":199296422,"uuid":"702527655","full_name":"Astrotomic/php-deepface","owner":"Astrotomic","description":"A PHP adapter for the python deepface framework.","archived":false,"fork":false,"pushed_at":"2024-07-15T14:40:07.000Z","size":62,"stargazers_count":36,"open_issues_count":6,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T21:06:02.418Z","etag":null,"topics":["age-prediction","arcface","deep-learning","deepface","deepid","emotion-recognition","face-analysis","face-recognition","facenet","facial-expression-recognition","facial-recognition","gender-prediction","hacktoberfest","machine-learning","openface","race-classification","treeware","vgg-face"],"latest_commit_sha":null,"homepage":"https://github.com/serengil/deepface","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/Astrotomic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":["Gummibeer","SarahSibert"],"issuehunt":"astrotomic","custom":["https://forest.astrotomic.info"]}},"created_at":"2023-10-09T13:41:34.000Z","updated_at":"2024-10-21T02:04:35.000Z","dependencies_parsed_at":"2023-11-18T06:31:06.509Z","dependency_job_id":"8dc14321-bfb8-4e1f-846b-668c64c459d6","html_url":"https://github.com/Astrotomic/php-deepface","commit_stats":{"total_commits":40,"total_committers":4,"mean_commits":10.0,"dds":0.4,"last_synced_commit":"bc269915cc8f5f3806c99bbb0412fd7aa4c3e512"},"previous_names":["astrotomic/php-deepface"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-deepface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-deepface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-deepface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-deepface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrotomic","download_url":"https://codeload.github.com/Astrotomic/php-deepface/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234087222,"owners_count":18777716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["age-prediction","arcface","deep-learning","deepface","deepid","emotion-recognition","face-analysis","face-recognition","facenet","facial-expression-recognition","facial-recognition","gender-prediction","hacktoberfest","machine-learning","openface","race-classification","treeware","vgg-face"],"created_at":"2024-11-06T23:34:43.388Z","updated_at":"2025-09-24T13:31:49.726Z","avatar_url":"https://github.com/Astrotomic.png","language":"PHP","funding_links":["https://github.com/sponsors/Gummibeer","https://github.com/sponsors/SarahSibert","https://issuehunt.io/r/astrotomic","https://forest.astrotomic.info"],"categories":[],"sub_categories":[],"readme":"# PHP DeepFace: Advanced Face Recognition for PHP\n\n[![Latest Version](http://img.shields.io/packagist/v/astrotomic/php-deepface.svg?label=Release\u0026style=for-the-badge)](https://packagist.org/packages/astrotomic/php-deepface)\n[![MIT License](https://img.shields.io/github/license/Astrotomic/php-deepface.svg?label=License\u0026color=blue\u0026style=for-the-badge)](https://github.com/Astrotomic/php-deepface/blob/master/LICENSE)\n[![Offset Earth](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-green?style=for-the-badge)](https://plant.treeware.earth/Astrotomic/php-deepface)\n[![Larabelles](https://img.shields.io/badge/Larabelles-%F0%9F%A6%84-lightpink?style=for-the-badge)](https://www.larabelles.com/)\n\n[![PHP Version](https://img.shields.io/packagist/dependency-v/astrotomic/php-deepface/php?style=flat-square\u0026label=PHP)](https://packagist.org/packages/astrotomic/php-deepface)\n[![Symfony Version](https://img.shields.io/packagist/dependency-v/astrotomic/php-deepface/symfony/process?style=flat-square\u0026label=Symfony)](https://packagist.org/packages/astrotomic/php-deepface)\n\n[![pint](https://img.shields.io/github/actions/workflow/status/Astrotomic/php-deepface/pint.yml?style=flat-square\u0026logo=github\u0026logoColor=white\u0026label=CS)](https://github.com/Astrotomic/php-deepface/actions/workflows/pint.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/php-deepface.svg?label=Downloads\u0026style=flat-square)](https://packagist.org/packages/astrotomic/php-deepface)\n[![Trees](https://img.shields.io/ecologi/trees/astrotomic?style=flat-square)](https://forest.astrotomic.info)\n[![Carbon](https://img.shields.io/ecologi/carbon/astrotomic?style=flat-square)](https://forest.astrotomic.info)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/gummibeer?style=flat-square)](https://github.com/sponsors/Gummibeer)\n\nWelcome to PHP DeepFace, a powerful face recognition and facial attribute analysis package for PHP. With PHP DeepFace, you can effortlessly integrate cutting-edge deep learning models into your PHP applications for a wide range of face-related tasks. Here's how you can get started:\n\n## Installation\n\nTo get started, you'll need to install the [deepface](https://github.com/serengil/deepface/tree/master#installation--) Python framework. You can do this using pip:\n\n```bash\npip install deepface\n```\n\nOnce you've installed deepface, you can then install the PHP adapter via Composer:\n\n```bash\ncomposer require astrotomic/php-deepface\n```\n\n## Configuration\n\nConfiguring PHP DeepFace is a breeze. Simply instantiate the `Astrotomic\\DeepFace\\DeepFace` class, and it will automatically detect your local Python executable:\n\n```php\n$deepface = new \\Astrotomic\\DeepFace\\DeepFace();\n```\n\nIf you have a specific Python version you'd like to use, you can provide the path to the Python executable as an argument:\n\n```php\n$deepface = new \\Astrotomic\\DeepFace\\DeepFace(\n    python: '/usr/bin/python3',\n);\n```\n\n## Usage\n\nPHP DeepFace provides a wide range of functionalities for face recognition and facial attribute analysis. Here are some key features:\n\n### Build Model\n\nYou can build a deepface face recognition or facial attribute model with ease:\n\n```php\n$deepface-\u003ebuildModel(\\Astrotomic\\DeepFace\\Enums\\FaceRecognitionModel::VGGFACE);\n```\n\n### Face Detection\n\nPerform face detection and alignment using this function:\n\n```php\n$deepface-\u003eextractFaces(\n  img_path: '~/test.png',\n);\n```\n\n### Face Verification\n\nVerify whether two images belong to the same person or different persons. This function calculates the similarity between facial image vectors:\n\n```php\n$deepface-\u003everify(\n  img1_path: '~/test.png',\n  img2_path: '~/id.jpg',\n);\n```\n\n### Face Recognition\n\nFind identities in a database by applying verification multiple times:\n\n```php\n$deepface-\u003efind(\n  img_path: '~/test.png',\n  db_path: '~/db',\n);\n```\n\n### Face Embeddings\n\nGenerate vector embeddings for facial images using convolutional neural networks models:\n\n```php\n$deepface-\u003erepresent(\n  img_path: '~/test.png',\n);\n```\n\n### Facial Attribute Analysis\n\nAnalyze facial attributes including age, gender, emotion, and race. This function builds convolutional neural network models to classify these attributes:\n\n```php\n$deepface-\u003eanalyze(\n  img_path: '~/test.png',\n);\n```\n\n## Testing\n\nRun tests to ensure everything is working as expected:\n\n```bash\ncomposer fix\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) guidelines for details. You may also want to review our [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).\n\n### Security\n\nIf you discover any security-related issues, please follow the steps outlined in our [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) guidelines to report them.\n\n## Credits\n\n- [Tom Herrmann](https://github.com/Gummibeer)\n- [Sefik Ilkin Serengil](https://github.com/serengil), the creator of [deepface](https://github.com/serengil/deepface)\n- [All Contributors](../../contributors)\n\n## License\n\nPHP DeepFace is released under the MIT License. Please see the [License File](LICENSE.md) for more information.\n\n## Treeware\n\nYou're free to use this package, but if it makes it to your production environment, we kindly request that you contribute to a greener world by planting a tree.\nTrees play a vital role in combating climate change and preserving our environment.\nYou can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/php-deepface). Help us make a positive impact! 🌳\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fphp-deepface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrotomic%2Fphp-deepface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fphp-deepface/lists"}