Giter VIP home page Giter VIP logo

plate-number-rekognition's Introduction

Plate Number Recognition with Amazon Rekognition

Read license plate number from existing video in S3

  1. Create an empty S3 bucket in same region of your Amazon Rekognition service, please note down your bucket name.
  2. Create the Amazon SNS topic, prepend the topic name with "AmazonRekognition" and note down your SNS ARN.
  3. Create the Amazon SQS queue, note down your SQS ARN.
  4. Allow SNS to send message to SQS, modify your SQS access policy:
{
  "Statement": [{
    "Effect":"Allow",
    "Principal": {
      "Service": "sns.amazonaws.com"
    },
    "Action":"sqs:SendMessage",
    "Resource":"<YOUR-SQS-ARN>",
    "Condition":{
      "ArnEquals":{
        "aws:SourceArn":"<YOUR-SNS-ARN>"
      }
    }
  }]
}
  1. Give Amazon Rekognition Video permission to publish the completion status of a video analysis operation to the Amazon SNS topic.
  • In IAM, create new policy:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "sns:Publish"
            ],
            "Resource": "<YOUR-TOPIC-ARN>"
        }
    ]
}

  • Create new Service Role, Choose Rekognition as AWS Service. Please note service role ARN.
  1. Subscribe the Amazon SQS queue to the Amazon SNS topic.
  2. Create Cloud9 Environment with default configuration and install boto3
sudo pip install boto3
  1. Clone demo repository:
git clone https://github.com/divaga/plate-number-rekognition.git
  1. Go to plate-number-rekognition folder and copy sample video to your S3 bucket
aws s3 cp traffic.mp4 s3://<YOUR-S3-BUCKET-NAME>/traffic.mp4
  1. Open detect-text.py and change value for roleArn (from step no.4), bucket name (from step no.1) and video file name (from step no.8)
  2. execute detect-text.py
python detext-text.py 
  1. For Lambda. use detect-text-lambda.py and set Lambda timeout properly.

plate-number-rekognition's People

Contributors

divaga avatar

Watchers

 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.