Giter Club home page Giter Club logo

rekognitions3batch's Introduction

Amazon Rekognition S3 Batch Tool

Quickly and easily process your images that are in your S3 bucket through Amazon Rekognition.

This example provides two programs:

  • a scanner that finds all the images you'd like to process, and adds them to SQS (Simple Queue Service)
  • a processor to run those images through Rekognition for label analysis, and saves those results to DynamoDB .

You can run these commands locally and drive a high throughput of image analysis, as this program is executing the processing and network transfers within AWS.

The examples can be run from the command line or by incorporating into your existing codebase. You can modify the code to run different image analysis, or to add different downstream processing (like writing to RDS, Elastic Search, or your on-premise DBs).

You should feel free to extend the code in these examples to meet your needs.

The scanner can be run in parallel to the processor; the processor monitors SQS and starts executing as soon as it sees jobs hit the queue.

Usage

To scan:

$ java -jar s3batch.jar -scan

usage: scanner -bucket <arg> [-filter <arg>] [-help] [-max <arg>] [-prefix <arg>] [-profile <arg>] -queue <arg>

 -bucket <arg>    S3 Bucket Name
 -filter <arg>    Key Filter Regex. Default '\.(jpg|jpeg|png)$'
 -help            Get this help.
 -max <arg>       Max number of images to add to queue.
 -prefix <arg>    S3 Bucket Prefix
 -profile <arg>   AWS Credential Profile Name (in ~/.aws/credentials).
                  Default 'default'
 -queue <arg>     SQS Queue to populate. Will create if it doesn't exit.

To process:

$ java -jar s3batch.jar -process

usage: scanner [-cloudsearch <arg>] [-concurrency <arg>]
 [-confidence <arg>] [-disablecerts] [-dynamo <arg>] [-endpoint <arg>] [-help]
 [-max <arg>] [-profile <arg>] -queue <arg>

 -cloudsearch <arg>   Cloud Search index to optionally insert into.
 -concurrency <arg>   Number of concurrent Rekognition jobs. Default 20
 -confidence <arg>    Minimum confidence in labels. Default 70.
 -disablecerts        Disable certificate checking.
 -dynamo <arg>        Dynamo DB table to optionally insert into.
 -endpoint <arg>      Override the Rekognition endpoint.
 -help                Get this help.
 -max <arg>           Max number of images to index.
 -profile <arg>       AWS Credential Profile Name (in ~/.aws/credentials).
                      Default 'default'
 -queue <arg>         SQS Queue to fetch tasks from.
 -tagprefix <arg>     S3 label tag prefix. Default 'rek.'
 -tagS3               Write detected labels back to S3 as Object Tags.

rekognitions3batch's People

Contributors

jhy 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.