Skip to content

Latest commit

 

History

History
70 lines (45 loc) · 2.19 KB

README.md

File metadata and controls

70 lines (45 loc) · 2.19 KB

Laravel Object Detection

Latest Version on Packagist Total Downloads

This package detects faces in an image using Machine Learning, TensorFlow and the MediaPipe Face Detection model.

Example

Installation

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"
    ]
}

Installation on Laravel Forge

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

Usage

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]}]

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ouff@live.se instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.