This package detects faces in an image using Machine Learning, TensorFlow and the MediaPipe Face Detection model.
You can install the package via composer:
composer require livijn/laravel-object-detection
You should add this to your composer.json
file to ensure that our package is fully installed.
"scripts": {
"post-install-cmd": [
"@php artisan object-detection:install"
]
}
If you are deploying on Laravel Forge, make sure you have sufficient node & npm versions. You can read this article on how to update nodejs on Forge.
To update npm, just run sudo npm install -g npm@latest
on your server.
I have only verified this works with these versions:
- node >= 16
- npm >= 7
LaravelObjectDetection::getObjectsFromImageUrl('https://some-url.com/some-image.jpg');
// Returns an ImageObject
// [{"class":"dog","score":0.973773181438446,"boundingBox":[239.84360694885254,75.59387746453285,505.188524723053,590.4131692349911]}]
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.