PHP code example of awssat / imageai

1. Go to this page and download the library: Download awssat/imageai library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

awssat / imageai example snippets


$imageAi = imageAi::image($img)->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();


$imageAi->results = 
        [
            [
                "name": "car"
                "percentage": 97.267699241638
                "box_points": [
                                1392
                                116
                                3541
                                1276
                            ]
                "image": Intervention\Image\Image //object iamge
            ]
      ]

$imageAi = imageAi::image($img)->speed('fast')->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();

$imageAi = imageAi::image($img)->customObjects(['car'])->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();

$imageAi = imageAi::image($img)->customObjects(['car'])->percentage(90)->model('RetinaNet', '/path/to/resnet50_coco_best_v2.0.1.h5')->detect();