Giter Club home page Giter Club logo

aws-licenseplaterecognition's Introduction

License Plate Text Recognition using AWS Textract/AWS Rekognition[Cloud]

About

  • Powerful tool to recognise license plates of vehicles from a video and convert them to text data for storage/data analysis
  • Uses AWS Services such as Textract and Rekognition to efficiently extract text from the video

Keywords: AWS API, EC2 instance, Cloud, Textract, Rekognition, python, OpenCV, Ubuntu, boto3, numpy, License Plate Recognition, Alpr, Image analysis, Real life image text recognition

How it works?

  • Extract frames from the video as images (OpenCV)
  • Pass the frames to AWS Textract or AWS Rekognition service to analyse and get detected text in the frames
  • Output detected text data to file/command prompt with timestamp

Pre-Requisites

  • OpenCV with Python3
  • AWS Ubuntu Linux VM EC2 instance with SSH Access (Free Tier works for testing/limited use)

Files in this repository

Sl NO FileName Functionality Requirements
1 VideoParserFPS.py Parses a local video file into frames at a specified frame rate and displays the parsed frames 1. OpenCV with Python (Python3 for uniformity across the project)
2. numpy python module
2 TextractLocal.py Processes a local image file (frame) using AWS Textract API and returns the result 1. AWS Ubuntu Linux EC2 Instance over SSH with Textract Security policies applied to IAM role of the instance
2. boto3 python module
3 RekognitionLocal.py Processes a local image file (frame) using AWS Rekognition API and returns the result. Claimed to produce better results than Textract on real life images. 1. AWS Ubuntu Linux EC2 Instance over SSH with Rekognition Security policies applied to IAM role of the instance
2. boto3 python module
4 TextractParserCumDetector.py Processes a local video file at a specified frame rate using Textract API and returns the extracted results with timestamp 1. OpenCV with Python (Python3 for uniformity across the project),
2. AWS Ubuntu Linux EC2 Instance over SSH with Textract Security policies applied to IAM role of the instance
3. boto3 and numpy python modules
5 RekognitionParserCumDetector.py Processes a local video file at a specified frame rate using Rekognition API and returns the extracted results with timestamp. Claimed to produce better results than Textract on real life images. 1. OpenCV with Python (Python3 for uniformity across the project),
2. AWS Ubuntu Linux EC2 Instance over SSH with Rekognition Security policies applied to IAM role of the instance
3. boto3 and numpy python modules

Files above are not dependent on each other.

  • Use VideoParserFPS.py to test parsing
  • Use TextractLocal.py and RekognitionLocal.py to test Text Detection on a frame
  • Use TextractParserCumDetector.py and RekognitionParserCumDetector.py for combined full functionality

Usage

Run the files in Ubuntu EC2 instance. Make sure to assign an IAM Role to the instance with Textract/Rekognition Policies attached. API calls to Textract/Rekognition will not work without these.

  • python3 VideoParserFPS.py
  • python3 TextractLocal.py

and so on...

Parameters to be set

  • Run the desired file from the same directory where frame.jpg or video.mp4 is present. Frame name/Video Name hard coded
  • Set aws-region in files 2, 3, 4, 5

Quick Guide to Install Requirements

OpenCV

sudo apt update
sudo apt install python3-opencv

You may want to compile OpenCV from source if above method doesn't work.

Python3 modules

sudo apt update
sudo apt install python3-pip

sudo pip3 install numpy
sudo pip3 install boto3

Additional

  • Use python3 TextractParserCumDetector.py >> DataDump.csv to redirect output to csv file for further analysis
  • Post processing of data and cleaning to make it more practically useful

aws-licenseplaterecognition's People

Contributors

vivek-nexus avatar

Watchers

 avatar

Forkers

eabalo

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.