PHP code example of moe-mizrak / aws-rekognition

1. Go to this page and download the library: Download moe-mizrak/aws-rekognition 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/ */

    

moe-mizrak / aws-rekognition example snippets


return [
    'credentials' => [
        'key'    => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
    ],
    'region'      => env('AWS_REGION', 'us-east-1'),
    'version'     => env('AWS_VERSION', 'latest'),
];

// Path to the image file
$imagePath = __DIR__.'/resources/images/test_labels.jpg';
// Read the image file into bytes
$image = file_get_contents($imagePath);
// Create an ImageData object
$imageData = new ImageData(
    bytes: $image,
);

// Create an S3ObjectData object
$s3Object = new S3ObjectData(
    bucket: 'your_bucket_name',
    name  : 'your_image_name.jpg',
);
// Create an ImageData object by providing the S3 object
$imageData = new ImageData(
    s3Object: $s3Object,
);

// Create a DetectLabelsData object
$detectLabelsData = new DetectLabelsData(
    image: $imageData,
);

// Create a DetectLabelsData object with optional parameters
$detectLabelsData = new DetectLabelsData(
    image        : $imageData,
    maxLabels    : 10, // Maximum number of labels to return
    minConfidence: 80.0, // Minimum confidence level for the labels to return
    settings     : new SettingsData(
        generalLabels: new GeneralLabelsSettingsData(
            labelCategoryExclusionFilters: ['Person Description'],
            labelCategoryInclusionFilters: ['Animals and Pets'],
            labelExclusionFilters        : ['Man', 'Woman'],
            labelInclusionFilters        : ['Dog', 'Cat'],
        ),
    ),
);

$response = Rekognition::detectLabels($detectLabelsData);

DetectLabelsResultData(
    labels: DataCollection([
        LabelData(
            name: 'Adult',
            parents: DataCollection([
                ParentData(name: 'Person'),
            ]),
            categories: DataCollection([
                CategoryData(name: 'Person Description'),
            ]),
            confidence: 99.406089782715,
            instances: DataCollection([
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.4137507379055,
                        height: 0.74068546295166,
                        left: 0.0,
                        top: 0.25919502973557,
                    ),
                    confidence: 99.406089782715,
                ),
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.4726165831089,
                        height: 0.55402708053589,
                        left: 0.29312029480934,
                        top: 0.23203137516975,
                    ),
                    confidence: 98.74324798584,
                ),
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.29476174712181,
                        height: 0.62268280982971,
                        left: 0.64589500427246,
                        top: 0.26460602879524,
                    ),
                    confidence: 98.648498535156,
                ),
            ]),
        ),
        LabelData(
            name: 'Male',
            parents: DataCollection([
                ParentData(name: 'Person'),
            ]),
            categories: DataCollection([
                CategoryData(name: 'Person Description'),
            ]),
            confidence: 99.406089782715,
            instances: DataCollection([
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.4137507379055,
                        height: 0.74068546295166,
                        left: 0.0,
                        top: 0.25919502973557,
                    ),
                    confidence: 99.406089782715,
                ),
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.40260022878647,
                        height: 0.50842136144638,
                        left: 0.5948948264122,
                        top: 0.49154290556908,
                    ),
                    confidence: 98.609413146973,
                ),
            ]),
        ),
        LabelData(
            name: 'Man',
            parents: DataCollection([
                ParentData(name: 'Adult'),
                ParentData(name: 'Male'),
                ParentData(name: 'Person'),
            ]),
            categories: DataCollection([
                CategoryData(name: 'Person Description'),
            ]),
            confidence: 99.406089782715,
            instances: DataCollection([
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.4137507379055,
                        height: 0.74068546295166,
                        left: 0.0,
                        top: 0.25919502973557,
                    ),
                    confidence: 99.406089782715,
                ),
            ]),
        ),
        LabelData(
            name: 'Person',
            categories: DataCollection([
                CategoryData(name: 'Person Description'),
            ]),
            confidence: 99.406089782715,
            instances: DataCollection([
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.4137507379055,
                        height: 0.74068546295166,
                        left: 0.0,
                        top: 0.25919502973557,
                    ),
                    confidence: 99.406089782715,
                ),
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.4726165831089,
                        height: 0.55402708053589,
                        left: 0.29312029480934,
                        top: 0.23203137516975,
                    ),
                    confidence: 98.74324798584,
                ),
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.29476174712181,
                        height: 0.62268280982971,
                        left: 0.64589500427246,
                        top: 0.26460602879524,
                    ),
                    confidence: 98.648498535156,
                ),
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.40260022878647,
                        height: 0.50842136144638,
                        left: 0.5948948264122,
                        top: 0.49154290556908,
                    ),
                    confidence: 98.609413146973,
                ),
            ]),
        ),
        LabelData(
            name: 'Woman',
            parents: DataCollection([
                ParentData(name: 'Adult'),
                ParentData(name: 'Female'),
                ParentData(name: 'Person'),
            ]),
            categories: DataCollection([
                CategoryData(name: 'Person Description'),
            ]),
            confidence: 98.74324798584,
            instances: DataCollection([
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.4726165831089,
                        height: 0.55402708053589,
                        left: 0.29312029480934,
                        top: 0.23203137516975,
                    ),
                    confidence: 98.74324798584,
                ),
                InstanceData(
                    boundingBox: BoundingBoxData(
                        width: 0.29476174712181,
                        height: 0.62268280982971,
                        left: 0.64589500427246,
                        top: 0.26460602879524,
                    ),
                    confidence: 98.648498535156,
                ),
            ]),
        ),
    ]),
    labelModelVersion: "3.0",
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
                "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
                "content-type" => "application/x-amz-json-1.1",
                "content-length" => "2658",
                "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create a CreateCollectionData object
$createCollectionData = new CreateCollectionData(
    collectionId: 'your_collection_id', // Unique identifier for the collection
    tags        : ['tag_key' => 'tag_value'], // Optional tags for the collection (A set of tags key-value pairs that you want to attach to the collection)
);

$response = Rekognition::createCollection($createCollectionData);

CreateCollectionResultData(
    collectionArn: "arn:aws:rekognition:us-east-1:123456789010:collection/your_collection_id",
    faceModelVersion: "7.0",
    statusCode: 200,
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create a DeleteCollectionData object
$deleteCollectionData = new DeleteCollectionData(
    collectionId: 'your_collection_id', // Unique identifier for the collection
);

$response = Rekognition::deleteCollection($deleteCollectionData);

DeleteCollectionResultData(
    statusCode: 200,
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create a ListCollectionsData object.
$listCollectionsData = new ListCollectionsData(
    maxResults: 10, // Maximum number of collection IDs to return - optional
    nextToken : 'your_next_token', // Pagination token from the previous response - optional
);

$response = Rekognition::listCollections($listCollectionsData);

ListCollectionsResultData(
    collectionIds: [
        "your_collection_id_0",
        "your_collection_id_1",
    ],
    faceModelVersions: [
        "7.0",
        "7.0",
    ],
    nextToken: "your_next_token",
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create a UserData object
$createUserData = new UserData(
    collectionId      : 'your_collection_id', // The ID of an existing collection -     /*
     * Optional - Idempotent token used to identify the request to createUser. 
     * If you use the same token with multiple createUser requests, the same response is returned.
     * Use clientRequestToken to prevent the same request from being processed more than once.
     */
    clientRequestToken: 'your_client_request_token',
);

$response = Rekognition::createUser($createUserData);

UserResultData(
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Delete a user from a collection
$deleteUserData = new UserData(
    collectionId      : 'your_collection_id', // The ID of an existing collection - request to deleteUser. 
     * If you use the same token with multiple deleteUser requests, the same response is returned.
     * Use clientRequestToken to prevent the same request from being processed more than once.
     */
    clientRequestToken: 'your_client_request_token',
);

$response = Rekognition::deleteUser($deleteUserData);

UserResultData(
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create a ListUsersData object
$listUsersData = new ListUsersData(
    collectionId: 'your_collection_id', // The ID of an existing collection - s response - optional
);

$response = Rekognition::listUsers($listUsersData);

ListUsersResultData(
    users: DataCollection([
        MatchedUserData(
            userId: "first_user_id",
            userStatus: "UPDATING",
        ),
        MatchedUserData(
            userId: "second_user_id",
            userStatus: "CREATED",
        )
    ]),
    nextToken: "your_next_token",
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Path to the image file
$imagePath = __DIR__.'/resources/images/test_labels.jpg';
// Read the image file into bytes
$image = file_get_contents($imagePath);
// Create an ImageData object
$imageData = new ImageData(
    bytes: $image,
);

// Create an S3ObjectData object
$s3Object = new S3ObjectData(
    bucket: 'your_bucket_name',
    name  : 'your_image_name.jpg',
);
// Create an ImageData object by providing the S3 object
$imageData = new ImageData(
    s3Object: $s3Object,
);

// Create an IndexFacesData object
$indexFacesData = new IndexFacesData(
    collectionId       : 'your_collection_id', // The ID of an existing collection - onal
    qualityFilter      : 'AUTO', // The quality filter for the face detection - optional
    externalImageId    : 'your_external_image_id', // ID you want to assign to all the faces detected in the image - optional
    detectionAttributes: ['ALL'], // An array of facial attributes you want to be returned - optional
);

$response = Rekognition::indexFaces($indexFacesData);

IndexFacesResultData(
    faceModelVersion: "7.0",
    faceRecords: DataCollection([
        FaceRecordData(
            face: FaceData(
                confidence: 99.406089782715,
                boundingBox: BoundingBoxData(
                    width: 0.4137507379055,
                    height: 0.74068546295166,
                    left: 0.0,
                    top: 0.25919502973557,
                ),
                faceId: "558388f6-221a-4f3f-aab5-1ccd8256f7e5",
                userId: "your_user_id",
                imageId: "970575de-6fc3-3762-8644-3b393cef2743",
                externalImageId: "your_external_image_id",
                indexFacesModelVersion: "7.0",
            ),
            faceDetail: FaceDetailData(
                confidence: 99.406089782715,
                boundingBox: BoundingBoxData(
                    width: 0.4737507379055,
                    height: 0.72068546295166,
                    left: 0.0,
                    top: 0.28919502973557,
                ),
                ageRange: AgeRangeData(
                    low: 20,
                    high: 30,
                ),
                emotions: DataCollection([
                    EmotionData(
                        type: "HAPPY",
                        confidence: 99.406089782715,
                    ),
                    EmotionData(
                        type: "SURPRISED",
                        confidence: 98.74324798584,
                    ),
                ]),
                eyeDirection: EyeDirectionData(
                    confidence: 99.406089782715,
                    yaw: 0.0,
                    pitch: 0.0,
                ),
                ...
            )
        ),
        FaceRecordData(
            face: FaceData(
                confidence: 97.406089782715,
                boundingBox: BoundingBoxData(
                    width: 0.4237507379055,
                    height: 0.70068546295166,
                    left: 0.8,
                    top: 0.28919502973557,
                ),
                faceId: "038388f6-221a-4f3f-aab5-1ccd8256f7e8",
                userId: "your_user_id",
                imageId: "8d0575de-6fc3-3762-8644-3b393cef2741",
                externalImageId: "your_external_image_id",
                indexFacesModelVersion: "7.0",
            ),
            faceDetail: FaceDetailData(
                confidence: 96.406089782715,
                boundingBox: BoundingBoxData(
                    width: 0.4737507379055,
                    height: 0.72068546295166,
                    left: 0.0,
                    top: 0.28919502973557,
                ),
                ageRange: AgeRangeData(
                    low: 25,
                    high: 35,
                ),
                emotions: DataCollection([
                    EmotionData(
                        type: "CALM",
                        confidence: 96.406089782715,
                    ),
                    EmotionData(
                        type: "CONFUSED",
                        confidence: 99.74324798584,
                    ),
                ]),
                eyeglasses: EyeglassesData(
                    confidence: 99.406089782715,
                    value: true,
                ),
                eyesOpen: EyesOpenData(
                    confidence: 99.496089782715,
                    value: true,
                ),
                ...
            )
        ),
        ...
    ]),
    unindexedFaces: DataCollection([
        UnindexedFaceData(
            reason: "LOW_CONFIDENCE",
            faceDetail: FaceDetailData(
                confidence: 66.406089782715,
                boundingBox: BoundingBoxData(
                    width: 0.4737507379055,
                    height: 0.72068546295166,
                    left: 0.0,
                    top: 0.28919502973557,
                ),
                ageRange: AgeRangeData(
                    low: 25,
                    high: 35,
                ),
                ...
            )
        ),
        UnindexFaceData(
           reason: "EXCEEDS_MAX_FACES",
           faceDetail: FaceDetailData(
             confidence: 86.406089782715,
             boundingBox: BoundingBoxData(
                  width: 0.4737507379055,
                  height: 0.72068546295166,
                  left: 0.0,
                  top: 0.28919502973557,
             ),
             ageRange: AgeRangeData(
                  low: 45,
                  high: 55,
             ),
             ...
           )
        ),
        ...
    ]),
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create an AssociateFacesData object
$associateFacesData = new AssociateFacesData(
    collectionId      : 'test_collection_id', // The id of an existing collection containing the userId -  : 'test_user_id', // The userId to associate with the faceIds. (The id for the existing userId.) - 

$response = Rekognition::associateFaces($associateFacesData);

AssociateFacesResultData(
    associatedFaces: DataCollection([
        AssociatedFaceData(
            faceId: "8e2ad714-4d23-43c0-b9ad-9fab136bef13",
        ),
        AssociatedFaceData(
            faceId: "ed49afb4-b45b-468e-9614-d652c924cd4a",
        ),
    ]),
    unsuccessfulFaceAssociations: DataCollection([
        UnsuccessfulFaceAssociationData(
            confidence: 70.0,
            faceId: "6e2ad714-4d23-43c0-b9ad-9fab136bef19",
            reasons: ["LOW_CONFIDENCE"],
            userId: "test_user_id",
        ),
        UnsuccessfulFaceAssociationData(
            confidence: 80.0,
            faceId: "5f2ad714-4d23-43c0-b9ad-9fab136bef15",
            reasons: ["LOW_QUALITY"],
            userId: "test_user_id",
        ),
    ]),
    userStatus: "UPDATING",
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create a ListFacesData object
$listFacesData = new ListFacesData(
    collectionId: 'your_collection_id', // The ID of an existing collection - face IDs to return information about - optional
    maxResults  : 10, // Maximum number of face IDs to return - optional
    nextToken   : 'your_next_token', // Pagination token from the previous response - optional
);

$response = Rekognition::listFaces($listFacesData);

ListFacesResultData(
    faces: DataCollection([
        FaceData(
            confidence: 99.406089782715,
            boundingBox: BoundingBoxData(
                width: 0.4137507379055,
                height: 0.74068546295166,
                left: 0.0,
                top: 0.25919502973557,
            ),
            faceId: "your_face_id_0",
            imageId: "your_image_id",
            userId: "your_user_id",
            externalImageId: "your_external_image_id",
        ),
        FaceData(
            confidence: 98.406089782715,
            boundingBox: BoundingBoxData(
                width: 0.4137507379055,
                height: 0.74068546295166,
                left: 0.0,
                top: 0.25919502973557,
            ),
            faceId: "your_face_id_1",
            imageId: "your_image_id",
            userId: "your_user_id",
            externalImageId: "your_external_image_id",
        ),
        ...
    ]),
    faceModelVersion: "7.0",
    nextToken: "your_next_token",
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Create a DeleteFacesData object
$deleteFacesData = new DeleteFacesData(
    collectionId: 'your_collection_id', // The ID of an existing collection - 

$response = Rekognition::deleteFaces($deleteFacesData);

DeleteFacesResultData(
    deletedFaces: ['your_face_id_0', 'your_face_id_1'],
    unsuccessfulFaceDeletions: DataCollection([
        UnsuccessfulFaceDeletionData(
            faceId: "your_face_id_2",
            reasons: ["LOW_CONFIDENCE"],
            userId: "your_user_id",
        ),
        UnsuccessfulFaceDeletionData(
            faceId: "your_face_id_3",
            reasons: ["LOW_QUALITY"],
            userId: "your_user_id",
        ),
    ]),
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);

// Path to the image file
$imagePath = __DIR__.'/resources/images/test_labels.jpg';
// Read the image file into bytes
$image = file_get_contents($imagePath);
// Create an ImageData object
$imageData = new ImageData(
    bytes: $image,
);

// Create an S3ObjectData object
$s3Object = new S3ObjectData(
    bucket: 'your_bucket_name',
    name  : 'your_image_name.jpg',
);
// Create an ImageData object by providing the S3 object
$imageData = new ImageData(
    s3Object: $s3Object,
);

// Create a SearchUsersByImageData object
$searchUsersByImageData = new SearchUsersByImageData(
    collectionId      : 'test_collection_id', // The id of an existing collection containing the userId - shold: 80.0, // Specifies the minimum confidence in the UserID match to return - optional
    qualityFilter     : 'MEDIUM', // A filter that specifies a quality bar for how much filtering is done to identify faces - optional
);

$response = Rekognition::searchUsersByImage($searchUsersByImageData);

SearchUsersByImageResultData(
    faceModelVersion: "7.0",
    userMatches: DataCollection([
        UserMatchData(
            similarity: 99.406089782715,
            user: MatchedUserData(
                userId: "test_user_id",
                userStatus: "ACTIVE",
            )
        ),
        UserMatchData(
            similarity: 96.406089782715,
            user: MatchedUserData(
                userId: "test_user_id_1",
                userStatus: "ACTIVE",
            )
        ),
        ...
    ]),
    searchedFace: SearchedFaceData(
        faceDetail: FaceDetailData(
            confidence: 99.406089782715,
            boundingBox: BoundingBoxData(
                width: 0.4137507379055,
                height: 0.74068546295166,
                left: 0.0,
                top: 0.25919502973557,
            ),
            ageRange: AgeRangeData(
                low: 20,
                high: 30,
            ),
            emotions: DataCollection([
                EmotionData(
                    type: "HAPPY",
                    confidence: 99.406089782715,
                ),
                EmotionData(
                    type: "SURPRISED",
                    confidence: 98.74324798584,
                ),
                ...
            ]),
            eyeDirection: EyeDirectionData(
                confidence: 99.406089782715,
                yaw: 0.0,
                pitch: 0.0,
            ),
            ...
        )
    ),
    unsearchedFaces: DataCollection([
        UnsearchedFaceData(
            faceDetail: FaceDetailData(
                confidence: 66.406089782715,
                boundingBox: BoundingBoxData(
                    width: 0.4737507379055,
                    height: 0.72068546295166,
                    left: 0.0,
                    top: 0.28919502973557,
                ),
                ageRange: AgeRangeData(
                    low: 25,
                    high: 35,
                ),
                ...
            ),
            reasons: ["FACE_NOT_LARGEST"],
        ),
        ...
    ]),
    metadata: MetadataData(
        statusCode: 200,
        effectiveUri: "https://rekognition.us-east-1.amazonaws.com/",
        headers: [
            "x-amzn-requestid" => "8dc27697-dc77-4d24-9f68-1f5080b536c9",
            "content-type" => "application/x-amz-json-1.1",
            "content-length" => "2658",
            "date" => "Fri, 17 Jan 2025 18:05:24 GMT",
        ],
        transferStats: [
            "http" => [
                [],
            ],
        ],
    ),
);
bash
php artisan vendor:publish --tag=aws-rekognition