softon/laravel-face-detect

A Laravel Package for Face Detection and Cropping in Images.
26,457 57
Install
composer require softon/laravel-face-detect
Latest Version:v0.2.2
PHP:>=8.0
License:MIT
Last Updated:Mar 15, 2023
Links: GitHub  ·  Packagist
Maintainer: softon

Laravel-Face-Detect

A Laravel Package for Face Detection and Cropping in Images.

Installation

Usage

To extract the Face and save the cropped image use...

use \Softon\LaravelFaceDetect\Facades\FaceDetect;


FaceDetect::extract($imagefilepath)->save($savefilepath);

To extract the Face and return the cropping coordinates without cropping the image...

use \Softon\LaravelFaceDetect\Facades\FaceDetect;


$crop_params = FaceDetect::extract($imagefilepath)->face;   // return array with x,y,width

To detect if face is found in a image...

use \Softon\LaravelFaceDetect\Facades\FaceDetect;


$crop_params = FaceDetect::extract($imagefilepath)->face_found;     // returns true/false

You may edit the config file facedetect.php in the config directory to add aditional padding to the cropped Images.

Related Packages

maystro/filament-popup-modal

A comprehensive modal dialog system for FilamentPHP with progress bars, callback...

9 1
wobeto/twitter

Laravel 4 Service Provider to interact with twitter account, like return a colle...

135 1
andrewmclagan/api

A RESTful API package for the Laravel and Lumen frameworks.

18 0