Download the PHP package leomarriel/laravel-face-detector without Composer
On this page you can find all versions of the php package leomarriel/laravel-face-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download leomarriel/laravel-face-detector
More information about leomarriel/laravel-face-detector
Files in leomarriel/laravel-face-detector
Package laravel-face-detector
Short Description A Face Detector for Laravel
License MIT
Informations about the package laravel-face-detector
Laravel Face Detector
A Laravel package to handle face detection in an image
Current Features
- reading a local or remote file
- external url support
- multiple ways available output the found face
- file validation
Installation
Configuration
Laravel without auto-discovery:
If you don't use auto-discovery, add the FaceDetectorServiceProvider
to the providers array in config/app.php
Copy configuration to your project:
By executing above command the package configuration will be published to config/facedetector.php
Config file
There are two configuration options available
config/facedetector.php
is an asociative array with the following possible keys:
- (string): the storage disk for file save on command output
save()
. - (bool): Disable the exception when a face is not found
- (array): Define a padding around the found face
Usage
Direct use, no facades:
You can create a new instance and load a local or remote file
If you want to use the facade to face detection, add this to your facades in config/app.php
:
Use the facade to face detection
There are currently two ways to load the file:
From Path
From Url
Output details
Check all available output ways
Save details
You can save the found face quickly with $face->save()
output.
The script will create a unique name for your file and store it in the facedetector
folder in your storage.
You can set your preferred storage location:
Take full control, set the storage path and file name to be saved. Save the file as JPG or PNG, it's your choice.
If the save succeeds, will return the following data:
☕️ Buy Me a Coffe
I'm happy to be able to contribute to your project, if this package helped you in any way, could you repay me with a coffee? Hugs!