Giter Site home page Giter Site logo

yashindane / platefetcher Goto Github PK

View Code? Open in Web Editor NEW
30.0 3.0 4.0 1.56 MB

Scan the number plate and get all the details of the vehicle! ๐Ÿš˜

Home Page: https://www.youtube.com/watch?v=-6oe8TJLzVk

License: MIT License

Dockerfile 2.35% Python 47.54% CSS 13.05% JavaScript 19.48% HTML 8.49% HCL 9.10%
arm64v8 aws flask opencv raspberry-pi docker podman automation ew-project-challenge-2024

platefetcher's Introduction

plateff



Docker Build/Publish Image

Platefetcher

Scan the number plate and get all the details of the vehicle!

platefetcher-gif ras1

Usage

๐Ÿ› ๏ธ Building the image

$ sudo docker build --platform linux/arm64/v8 -t <IMAGE-NAME> .

Pulling the image

$ sudo podman/docker pull --platform linux/arm64/v8 docker.io/yashindane/demoplate:12

โ–ถ๏ธ Running the container

Using podman

$ sudo podman run --network=host --platform linux/arm64/v8 -dit --device /dev/video0 --name <NAME> \
  docker.io/yashindane/demoplate:12 --aak="<AWS_ACCESS_KEY>" --ask="<AWS_SECRET_KEY>" \
  --region="<DEFAULT_REGION>" --bucketname="<BUCKET_NAME>" --user="<REG_CHECK_USER>"

Using docker

$ sudo docker run --platform linux/arm64/v8 -dit -p <PORT>:2400 --device /dev/video0 --name <NAME> \
  docker.io/yashindane/demoplate:12 --aak="<AWS_ACCESS_KEY>" --ask="<AWS_SECRET_KEY>" \
  --region="<DEFAULT_REGION>" --bucketname="<BUCKET_NAME>" --user="<REG_CHECK_USER>"

Optional arguments

Argument Description
--dbhost Host endpoint of DB instance (String)
--dbport Port at which DB service running (String)
--dbuser DB username (String)
--dbpass DB password min 8 characters (String)

Access

Tool Path
podman http://IP:2400/out
docker http://IP:PORT/out

Prerequisites

  1. Installing docker
$ sudo curl -fsSL https://get.docker.com -o docker-install.sh
$ sh docker-install.sh
$ sudo usermod -aG docker pi
$ sudo reboot
  1. (optional) Installing podman
$ sudo apt-get -y install podman
  1. (optional) Installing terraform
$ sudo wget https://releases.hashicorp.com/terraform/1.3.7/terraform_1.3.7_linux_arm64.zip
$ sudo unzip <ZIPFILE>
$ sudo mv terraform /usr/bin/
  1. Create a publically accessible bucket with the IAM user in AWS. The user must have PowerUser and AdminUser access.

Configure this bucket policy-

{
  "Id": "Policy1664186300628",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1664186298804",
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::<BUCKET-NAME>/*",
      "Principal": "*"
    }
  ]
}
  1. Create a account on http://www.regcheck.org.uk and pass that username with --user=.

  2. (optional) Creating a mysql DB instance for all plate details to store in.

  3. (optional) Creating the DB and S3 bucket using terraform

(optional) Navigate to infra-provisioning directory and run below to create DB instance and S3 bucket -

$ sudo terraform init
$ sudo terraform validate
$ sudo terraform plan
$ sudo terraform apply -var="access_key=<AWS_ACCESS_KEY>" -var="secret_key=<AWS_SECRET_KEY>" -var="bucket_name=<S3_BUCKET_NAME>" \
  -var="identifier=<DB_IDENTIFIER>" -var="db_username=<DB_USERNAME>" -var="db_pass=<DB_PASSWORD>" -auto-approve

Working

dia

  1. Using image proccesing the region of interest, ie the plate is extracted.
  2. The detected plate image is uploaded to Amazon S3.
  3. AWS textract uses that image to extract the numbers.
  4. Raspberry Pi receives the extracted numbers.
  5. Using https://www.regcheck.org.uk API the Pi gets the vehical details using the plate number.
  6. The results are printed on the Phone.

Reference

[1] Ravi Kiran Varma Pa*, Srikanth Gantaa, Hari Krishna Bb, Praveen SVSRKc "A Novel Method for Indian Vehicle Registration Number Plate Detection and Recognition using Image Processing Techniques", International Conference on Computational Intelligence and Data Science (ICCIDS 2019)

platefetcher's People

Contributors

yashindane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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