https://github.com/awssat/imageai
Wrapper for imageAi (python) in php
https://github.com/awssat/imageai
Last synced: 4 months ago
JSON representation
Wrapper for imageAi (python) in php
- Host: GitHub
- URL: https://github.com/awssat/imageai
- Owner: awssat
- License: mit
- Created: 2019-06-10T11:28:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-24T15:22:33.000Z (almost 5 years ago)
- Last Synced: 2025-06-14T09:05:11.471Z (4 months ago)
- Language: PHP
- Size: 600 KB
- Stars: 14
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Php ImageaAi
Php soultion for https://github.com/OlafenwaMoses/ImageAI . try AI features in Php with help of python libraries
## Requirements
First you need to install https://github.com/OlafenwaMoses/ImageAI with all requirements
## InstallVia Composer
```bash
composer require awssat/imageai
```## Usage
```php
$imageAi = imageAi::image($img)->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();
```
##### Result```php
$imageAi->results =
[
[
"name": "car"
"percentage": 97.267699241638
"box_points": [
1392
116
3541
1276
]
"image": Intervention\Image\Image //object iamge
]
]
```you should always define a model that supported in OlafenwaMoses/ImageAI
### Model types
```
RetinaNet
YOLOv3
TinyYOLOv3
```you must download the RetinaNet, YOLOv3 or TinyYOLOv3 object detection model via the links below:
- RetinaNet (Size = 145 mb, high performance and accuracy, with longer detection time)- YOLOv3 (Size = 237 mb, moderate performance and accuracy, with a moderate detection time)
- TinyYOLOv3 (Size = 34 mb, optimized for speed and moderate performance, with fast detection time)
### Other use cases
#### Speed
You can define speed of detection (affect accuracy) by simply calling```php
$imageAi = imageAi::image($img)->speed('fast')->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();
```supported speeds (fast, faster, fastest, flash)
#### Specfic objects
You can only detect custom objects
```php
$imageAi = imageAi::image($img)->customObjects(['car'])->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();
```#### Percentage
Define a minimum percentage of detection proccess
```php
$imageAi = imageAi::image($img)->customObjects(['car'])->percentage(90)->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();
```## Contributing
You are very welcome to contribute and improve this package.
## Credits
- [Bader][link-author]
- [All Contributors][link-contributors]## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
[link-author]: https://github.com/if4lcon
[link-contributors]: ../../contributors