Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11
A PHP adapter for the python deepface framework.
License
Astrotomic/php-deepface
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Welcome 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:
To get started, you'll need to install thedeepface Python framework. You can do this using pip:
pip install deepface
Once you've installed deepface, you can then install the PHP adapter via Composer:
composer require astrotomic/php-deepface
Configuring PHP DeepFace is a breeze. Simply instantiate theAstrotomic\DeepFace\DeepFace class, and it will automatically detect your local Python executable:
$deepface =new \Astrotomic\DeepFace\DeepFace();
If you have a specific Python version you'd like to use, you can provide the path to the Python executable as an argument:
$deepface =new \Astrotomic\DeepFace\DeepFace( python:'/usr/bin/python3',);
PHP DeepFace provides a wide range of functionalities for face recognition and facial attribute analysis. Here are some key features:
You can build a deepface face recognition or facial attribute model with ease:
$deepface->buildModel(\Astrotomic\DeepFace\Enums\FaceRecognitionModel::VGGFACE);
Perform face detection and alignment using this function:
$deepface->extractFaces( img_path:'~/test.png',);
Verify whether two images belong to the same person or different persons. This function calculates the similarity between facial image vectors:
$deepface->verify( img1_path:'~/test.png', img2_path:'~/id.jpg',);
Find identities in a database by applying verification multiple times:
$deepface->find( img_path:'~/test.png', db_path:'~/db',);
Generate vector embeddings for facial images using convolutional neural networks models:
$deepface->represent( img_path:'~/test.png',);
Analyze facial attributes including age, gender, emotion, and race. This function builds convolutional neural network models to classify these attributes:
$deepface->analyze( img_path:'~/test.png',);
Run tests to ensure everything is working as expected:
composer fix
We welcome contributions! Please see ourCONTRIBUTING guidelines for details. You may also want to review ourCODE OF CONDUCT.
If you discover any security-related issues, please follow the steps outlined in ourSECURITY guidelines to report them.
- Tom Herrmann
- Sefik Ilkin Serengil, the creator ofdeepface
- All Contributors
PHP DeepFace is released under the MIT License. Please see theLicense File for more information.
You'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.Trees play a vital role in combating climate change and preserving our environment.You can buy trees atoffset.earth/treeware. Help us make a positive impact! 🌳
About
A PHP adapter for the python deepface framework.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.