Download the PHP package moe-mizrak/aws-rekognition without Composer

On this page you can find all versions of the php package moe-mizrak/aws-rekognition. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package aws-rekognition

AWS Rekognition API for Laravel


Latest Version on Packagist

Laravel package for AWS Rekognition API (PHP 8)


Amazon Rekognition is a cloud-based image and video analysis service that makes it easy to add advanced computer vision capabilities to your applications. The service is powered by proven deep learning technology and it requires no machine learning expertise to use. Amazon Rekognition includes a simple, easy-to-use API that can quickly analyze any image or video file that’s stored in Amazon S3.

Table of Contents

πŸ€– Requirements

🏁 Get Started

You can install the package via composer:

You can publish the aws-rekognition config file with:

This is the contents of the published config file:

🧩 Configuration

After publishing the aws-rekognition config file, you'll need to add the following environment variables to your .env file:

[!IMPORTANT] Give following Permissions to the IAM user for accessing the Rekognition API:

  • AmazonRekognitionFullAccess
  • AmazonS3FullAccess

[!CAUTION] The region for the S3 bucket containing the S3 object must match the region you use for Amazon Rekognition operations.

For more info, please refer to AWS Client.

🎨 Usage

The Rekognition facade offers a convenient way to make AWS Rekognition API requests.

[!NOTE] AWS Rekognition API offers over 10 primary operations across various categories for image and video analysis, but this package currently supports only a handful of them.

Contributions are highly encouraged! If you'd like to add support for more operations, feel free to contribute to the package.

Check out the full list of Rekognition operations Amazon Rekognition.

Following Rekognition API operations are supported:

[!TIP] All classes include comprehensive DocBlock comments and detailed documentation to enhance readability and understanding.

Refer to the class definitions for a complete overview of methods, parameters, and their usage.

Detect Labels

Detects instances of real-world entities within an image (JPEG or PNG) provided as input. This includes objects like flower, tree, and table; events like wedding, graduation, and birthday party; and concepts like landscape, evening, and nature.

Labels supported by Rekognition label detection operations can be found in Detecting Objects and Concepts.

First of all, you need to create an instance of ImageData object by providing the image bytes of an image file.

Alternatively, you can use S3 as the image source: For more details, see [S3Object](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-rekognition-2016-06-27.html#shape-s3object) section.

To send a detect labels request, you need to create an instance of DetectLabelsData object.

More optional parameters can be provided to the DetectLabelsData object: Check out [`DetectLabelsData`](src/Data/DetectLabelsData.php) class for optional parameters and their descriptions. For more details, see [DetectLabels](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-rekognition-2016-06-27.html#detectlabels) section.

Then, you can send the request using the Rekognition facade detectLabels method.

Response will be an instance of DetectLabelsResultData object.

This is the sample DetectLabelsResultData:

Collections

The face collection is the primary Amazon Rekognition resource. A collection is a container for faces that you want to search, compare, or store.

Check out Managing Face Collections, Faces, and Users for more details.

Create Collection

Creates a collection in an AWS Region.

To create a collection, you need to create an instance of CreateCollectionData object:

Then, you can send the request using the Rekognition facade createCollection method:

Response will be an instance of CreateCollectionResultData object.

[!TIP] CreateCollectionResultData contains the collectionArn - Amazon Resource Name (ARN) of the collection. You can use this to manage permissions on your resources.

Please refer to Identify AWS resources with Amazon Resource Names (ARNs) for more details.

This is the sample CreateCollectionResultData:

Delete Collection

Deletes the specified collection with the provided collectionId.

[!WARNING] Deleting a collection also removes all faces in the collection.

To delete a collection, you need to create an instance of DeleteCollectionData object:

Then, you can send the request using the Rekognition facade deleteCollection method:

Response will be an instance of DeleteCollectionResultData object.

This is the sample DeleteCollectionResultData:

List Collections

Returns the list of collections in the AWS account.

To list collections, you need to create an instance of ListCollectionsData object:

Then, you can send the request using the Rekognition facade listCollections method:

Response will be an instance of ListCollectionsResultData object.

This is the sample ListCollectionsResultData:

User

AWS Rekognition user is entity that represents a face in a collection.

Create User

Creates a new user within a collection specified by collectionId and unique userId.

To create a user, you need to create an instance of UserData object:

[!NOTE] userId needs to be unique within the collection.

Then, you can send the request using the Rekognition facade createUser method:

Response will be an instance of UserResultData object.

[!NOTE] The result for the createUser request is always empty, only metadata is returned in UserResultData.

This is the sample UserResultData:

Delete User

Deletes a user from a collection specified by collectionId and userId.

[!NOTE] Faces that are associated with the userId are disassociated from the userId before deleting the specified userId.

To delete a user, you need to create an instance of UserData object:

Then, you can send the request using the Rekognition facade deleteUser method:

Response will be an instance of UserResultData object.

[!NOTE] The result for the deleteUser request is always empty, only metadata is returned in UserResultData.

This is the sample UserResultData:

List Users

Lists the users in a collection specified by collectionId.

To list users, you need to create an instance of ListUsersData object:

Then, you can send the request using the Rekognition facade listUsers method:

Response will be an instance of ListUsersResultData object.

This is the sample ListUsersResultData:

Face

AWS Rekognition face is an entity that represents a detected and indexed face in a collection.

Index Faces

Detects faces in the input image and adds them to the specified collection.

First of all, you need to create an instance of ImageData object by providing the image bytes of an image file.

Alternatively, you can use S3 as the image source: For more details, see [S3Object](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-rekognition-2016-06-27.html#shape-s3object) section.

Then, in order to index faces, you need to create an instance of IndexFacesData object:

[!NOTE] 1) detectionAttributes: Requesting more attributes may increase response time. 2) maxFaces: IndexFaces returns no more than 100 detected faces in an image, even if you specify a larger value for maxFaces.

Then, you can send the request using the Rekognition facade indexFaces method:

Response will be an instance of IndexFacesResultData object.

This is the sample IndexFacesResultData:

Associate Faces

Associates one or more faces with an existing userId.

To associate faces, you need to create an instance of AssociateFacesData object:

[!NOTE] 1) The maximum number of total faceIds per userId is 100. 2) userMatchThreshold: The default value is 75.0. 3) clientRequestToken: If you use the same token with multiple associate faces requests, the same response is returned. Use clientRequestToken to prevent the same request from being processed more than once.

Then, you can send the request using the Rekognition facade associateFaces method:

Response will be an instance of AssociateFacesResultData object.

This is the sample AssociateFacesResultData:

List Faces

Lists the faces in a collection specified by collectionId.

To list faces, you need to create an instance of ListFacesData object:

Then, you can send the request using the Rekognition facade listFaces method:

Response will be an instance of ListFacesResultData object.

This is the sample ListFacesResultData:

Delete Faces

Deletes faces from a collection specified by collectionId and faceIds.

To delete faces, you need to create an instance of DeleteFacesData object:

Then, you can send the request using the Rekognition facade deleteFaces method:

Response will be an instance of DeleteFacesResultData object.

This is the sample DeleteFacesResultData:

Search Users By Image

Searches for userIds using a supplied image. It first detects the largest face in the image, and then searches a specified collection for matching userIds.

First of all, you need to create an instance of ImageData object by providing the image bytes of an image file.

Alternatively, you can use S3 as the image source: For more details, see [S3Object](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-rekognition-2016-06-27.html#shape-s3object) section.

Then, in order to search users by image, you need to create an instance of SearchUsersByImageData object:

[!NOTE] 1) userMatchThreshold: The default value is 80.0 2) qualityFilter: The default value is NONE.

Then, you can send the request using the Rekognition facade searchUsersByImage method:

Response will be an instance of SearchUsersByImageResultData object.

This is the sample SearchUsersByImageResultData:

πŸ’« Contributing

Your contributions are welcome! If you'd like to improve this package, simply create a pull request with your changes. Your efforts help enhance its functionality and documentation.

If you find this package useful, please consider ⭐ it to show your support!

πŸ“œ License

AWS Rekognition API for Laravel is an open-sourced software licensed under the MIT license.


All versions of aws-rekognition with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
aws/aws-sdk-php Version ^3.336
spatie/laravel-data Version ^4.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package moe-mizrak/aws-rekognition contains the following files

Loading the files please wait ....