GithubHelp home page GithubHelp logo

guillim / dgm-image-tags-french Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5 KB

Automatic image tagging (captioning) in french for images using the Amazon Recognition API -> the serverless way

JavaScript 100.00%
image-recognition image-labeling image-tagging labeling label french

dgm-image-tags-french's Introduction

Tag an Image (stored on AWS S3) with Amazon Rekognition

This simple project shows how to label an image in an S3 bucket with Amazon Rekognition API and return a list of labels.

Setup

You need to create an S3 bucket and upload at least one file. Be sure the permissions on the folder and file allow public access and that CORS is configured to allow access.

  • Install npm packages
npm install

Deploy

In order to deploy the function run:

serverless deploy

The expected result should be similar to:

Serverless: Packaging service...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading service .zip file to S3 (3.78 MB)...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............
Serverless: Stack update finished...
Service Information
service: rekognition-analysis-s3-image
stage: dev
region: us-east-1
api keys:
  None
endpoints:
  POST - https://6bbhhv5q22.execute-api.us-east-1.amazonaws.com/dev/analysis
functions:
  imageAnalysis: rekognition-analysis-s3-image-dev-imageAnalysis

Use

You can now send an HTTP POST request directly to the endpoint using a tool like curl

curl -XPOST 'https://6bbhhv5q22.execute-api.us-east-1.amazonaws.com/dev/analysis' \
--header 'Content-Type: application/json' \
--data-raw '{
  "bucket": "mycatphotos",
  "imageName": "cat.jpg"
}'

Or use the following CLI (you have to create post.json according to the previous json)

serverless invoke local -f imageAnalysis -p post.json

The expected result should be similar to:

{
    "Labels": [
        {
            "Confidence": 96.59198760986328,
            "Name": "Animal"
        },
        {
            "Confidence": 96.59198760986328,
            "Name": "Cat"
        },
        {
            "Confidence": 96.59198760986328,
            "Name": "Pet"
        },
        {
            "Confidence": 96.59198760986328,
            "Name": "Siamese"
        }
    ]
}

Scaling

By default, AWS Lambda limits the total concurrent executions across all functions within a given region to 100. The default limit is a safety limit that protects you from costs due to potential runaway or recursive functions during initial development and testing. To increase this limit above the default, follow the steps in To request a limit increase for concurrent executions.

Acknowledgment

This repo was originaly created by serverless and all the credit is for them

dgm-image-tags-french's People

Contributors

guillim avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.