This repository provides a simple implementation of object detection from an image using AWS Rekognition, API Gateway, and Lambda functions. The Lambda function is triggered by API Gateway when an image is sent through a POST request. The API can be tested using Postman.
The architecture involves the following components:
-
AWS Lambda Function: Receives image data from API Gateway, decodes it, and performs object detection using the AWS Rekognition service.
-
AWS Rekognition Service: Used for detecting labels in the image.
-
API Gateway: Serves as the interface for external applications to interact with the Lambda function. It triggers the Lambda function when a POST request with an image is received.
The use case for this implementation is to detect objects in an image. The Lambda function receives the image through API Gateway, processes it using AWS Rekognition, and returns information about the detected objects along with their confidence levels.
The Lambda function is responsible for decoding the base64-encoded image data, converting it to the required format, and utilizing the AWS Rekognition service to perform object detection. The extracted information about the detected objects is then returned in the API response.
A Lambda Layer is utilized to include external libraries, such as PIL
(Pillow), required for image processing. This ensures a clean and organized code structure.
API Gateway is configured to trigger the Lambda function when a POST request is received. The integration allows seamless communication between the external application and the Lambda function.
The API is deployed, making it accessible for external applications to send images for object detection.
Postman can be used to test the deployed API by sending a POST request with a binary image in the request body. The API response includes information about the detected objects and their confidence levels.
This project is licensed under the MIT License.
Feel free to contribute, open issues, or provide feedback!