freearhey/laravel-face-detection
Face Detection 
A Laravel Package for Face Detection.
Installation
- Install the package via composer:
composer require freearhey/laravel-face-detection
- Add the service provider to the
config/app.phpfile in Laravel:
'providers' => [
...
Arhey\FaceDetection\FaceDetectionServiceProvider::class,
...
],
- Publish the config file by running:
php artisan vendor:publish
Usage
use Arhey\FaceDetection\Facades\FaceDetection;
$face = FaceDetection::extract('path/to/image.jpg');
To detect if face is found in a image:
if($face->found) {
// face found
} else {
// face not found
}
To get the facial boundaries:
var_dump($face->bounds);
/*
array(
'x' => 292.0,
'y' => 167.0,
'w' => 204.8,
'h' => 204.8,
)
*/
To save the found face image:
$face->save('path/to/output.jpg');
Testing
vendor/bin/phpunit
License
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
648,266,899
9,701
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
429,221,767
607
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.4.0 | ^8.1 | ^9.0 | MIT | |
| 1.3.0 | ^7.3| | ^8.0 | MIT | |
| 1.2.0 | ^7.3 | ^8.0 | MIT | |
| 1.1.0 | ^7.0 | ^7.0 | MIT | |
| 1.0.5 | ^7.0 | ~5.0| | MIT | |
| 1.0.4 | ^7.0 | ~5.0| | MIT | |
| 1.0.3 | ^7.0 | ~5.0| | MIT | |
| 1.0.2 | ^7.0 | ~5.0| | MIT | |
| 1.0.0 | >=5.3 | ~5.0| | MIT |