Scan the number plate and get all the details of the vehicle!
$ sudo docker build --platform linux/arm64/v8 -t <IMAGE-NAME> .
$ sudo podman/docker pull --platform linux/arm64/v8 docker.io/yashindane/demoplate:12
$ 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>"
$ 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>"
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) |
Tool | Path |
---|---|
podman |
http://IP:2400/out |
docker |
http://IP:PORT/out |
- Installing docker
$ sudo curl -fsSL https://get.docker.com -o docker-install.sh
$ sh docker-install.sh
$ sudo usermod -aG docker pi
$ sudo reboot
- (optional) Installing podman
$ sudo apt-get -y install podman
- (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/
- Create a publically accessible bucket with the
IAM
user in AWS. The user must havePowerUser
andAdminUser
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": "*"
}
]
}
-
Create a account on http://www.regcheck.org.uk and pass that username with
--user=
. -
(optional) Creating a mysql DB instance for all plate details to store in.
-
(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
- Using image proccesing the region of interest, ie the plate is extracted.
- The detected plate image is uploaded to Amazon S3.
- AWS textract uses that image to extract the numbers.
- Raspberry Pi receives the extracted numbers.
- Using https://www.regcheck.org.uk API the Pi gets the vehical details using the plate number.
- The results are printed on the Phone.
[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)