softon / laravel-face-detect by softon

A Laravel Package for Face Detection and Cropping in Images.
19,631
55
6
Package Data
Maintainer Username: softon
Maintainer Contact: powerupneo@gmail.com (Shiburaj)
Package Create Date: 2016-04-11
Package Last Update: 2023-03-15
Language: PHP
License: MIT
Last Refreshed: 2024-04-29 15:09:04
Package Statistics
Total Downloads: 19,631
Monthly Downloads: 267
Daily Downloads: 20
Total Stars: 55
Total Watchers: 6
Total Forks: 23
Total Open Issues: 3

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.