Skip to content

ImageLabelerPro is a serverless AWS Lambda function for automatic image labeling using Amazon Rekognition. This project detects labels in images uploaded to an S3 bucket and stores the results in a separate bucket. Enhance your image processing workflows effortlessly!

Notifications You must be signed in to change notification settings

GadagojuShiva/ImageLabelerPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

I M A G E - L A B E L E R - P R O

Table of Contents

Description

ImageLabelerPro is a project that automates the process of labeling images using AWS Lambda and Rekognition services. This project provides a step-by-step guide on setting up the required AWS resources, creating Lambda functions, and configuring triggers to label images automatically. The labeled results are stored in a designated S3 bucket for easy access.

Architecture

ImageLabelerPro Logo

ImageLabelerPro works like a helpful wizard in the cloud! The wizard, called imagelabelerpro-label-Function 🧙‍♂️, uses a special tool called Amazon Rekognition to look at pictures and tell us what's in them. When you put a picture in the magic bucket (imagelabelerpro-upload-bucket 🪣), the wizard wakes up and starts working on it. The results, like a list of magic words, are kept safe in another bucket (imagelabelerpro-results-bucket 📦). It's super easy for anyone to upload pictures, let the wizard do its thing, and then check what the wizard found in the results bucket. The wizard has a special role that lets it do its magic, like opening doors to other tools and talking to Amazon Rekognition. This setup makes ImageLabelerPro a simple and powerful way to understand what's in pictures using the cloud magic! ✨

Setting Up AWS Resources

Creating a Lambda Execution Role

  • Go to the IAM Roles Console.
  • Create a new role named ImageLabelerProLambdaRole with the following policies:
    • AWSLambdaBasicExecutionRole
    • AmazonS3FullAccess
    • AmazonRekognitionFullAccess ImageLabelerPro Logo

Creating S3 Buckets

  • Go to the Amazon S3 Console.
  • Create a new S3 bucket for image uploads, e.g., imagelabelerpro-upload-bucket.
  • Create another S3 bucket for storing labeled results, e.g., imagelabelerpro-results-bucket.
  • Ensure that the results bucket has public access. Use the following policy:
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "PublicReadGetObject",
          "Effect": "Allow",
          "Principal": "*",
          "Action": ["s3:GetObject"],
          "Resource": ["arn:aws:s3:::imagelabelerpro-results-bucket/*"]
        }
      ]
    }

Creating Lambda Function

  • Go to the Lambda Console.
  • Create a new function named imagelabelerpro-label-Function.
  • Select Runtime as Python 3.8
  • Select the role that we have created earlier - ImageLabelerProLambdaRole
  • Copy the provided code and paste it into the function - imagelabelerpro-label-function
  • Update the output bucket name in the code to match your results bucket. alt text
  • Note: Now Go to Configurations tab and in general configuration change the timeout from 3 sec to 10 sec otherwise you may get timeout error
  • Deploy the function.

Configuring S3 Trigger

  • In the Lambda Console designer or diagram section, click on "Add Trigger." alt text

  • Select S3 and choose the upload bucket (imagelabelerpro-upload-bucket). alt text

  • Click on Save.

Uploading Images and Verifying Results

  • Upload an image to the upload bucket (imagelabelerpro-upload-bucket). alt text

  • Go to the results bucket (imagelabelerpro-results-bucket/results). alt text

  • Click on the labeled image and view the JSON-formatted output. alt text

  • Click on the object-url alt text alt text

  • Used image - Sample-Image

Conclusion

ImageLabelerPro simplifies the process of image labeling using AWS services. Follow the provided steps to set up the necessary resources, create Lambda functions, and verify the labeled results. Your feedback is highly valued, and if you have any suggestions for enhancements or improvements, please feel free to open an issue or contribute to the project on GitHub. Thank you for using ImageLabelerPro!

About

ImageLabelerPro is a serverless AWS Lambda function for automatic image labeling using Amazon Rekognition. This project detects labels in images uploaded to an S3 bucket and stores the results in a separate bucket. Enhance your image processing workflows effortlessly!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages