A Bangla number plate recognition system made using Python and done by me and my teammates from IUB for our Senior Project
Streets and parkways are one of the main methods of transport and there should be a few guidelines to guarantee that everything is good to go. Street rules are intended to safeguard us and from different drivers out and about and to keep up with appropriate traffic stream. Auto collisions are principally brought about by infringement of transit regulations. Street accidents and mishaps kill 12,000 individuals and cause 35,000 wounds in Bangladesh every year, says the Accident Research Institute of the state-run Bangladesh University of Engineering and Technology. We are making a framework to recognize the number plates and speed of a vehicle. Our initiative would dispense the manual approach of recognizing traffic offenders. As a result, it decreases staff and permits us to take necessary actions faster.
-
pytesseract, Tesseract-OCR (install from https://tesseract-ocr.github.io/tessdoc/Home.html and choose Bengali language)
-
numpy
-
cv2 (install by running "pip install opencv-contrib-python")
-
PIL (for image resizing and processing)
-
datetime, time
-
mysql.connector (for database connection) (install by running "pip install mysql-connector-python")
-
XAMPP (for running the mysql server)
- for windows, install from https://www.apachefriends.org/download.html and set root password by following this link https://kinsta.com/knowledgebase/xampp-mysql-password/
- for linux follow the instructions from https://www.apachefriends.org/faq_linux.html and start server with sudo /opt/lampp/lampp start and stop with sudo /opt/lampp/lampp stop
- for raspberry pi follow instructions at https://randomnerdtutorials.com/raspberry-pi-apache-mysql-php-lamp-server/
-
Microsoft .NET 4.0 (for Rebex Tiny SFTP Server on Windows)
-
os (for running the sftp application "Rebex Tiny SFTP Server" on Windows)
-
sys (for checking platform)
-
keyboard (for inputs) (in order to run on Linux, python3 must be run as sudo by using sudo su)
-
tkinter (for GUI)
-
prettytable (for report and receipt generate)
-
requests, json (for accessing SMSQ's SMS API)
-
pywhatkit, pyautogui (for optional WhatsApp message sending)
-
envelopes (for single email)
-
email, smtplib, ssl, Template (for bulk email)
-
pdfkit, wkhtmltopdf (for converting html to pdf) (install from https://wkhtmltopdf.org/downloads.html)
- For Windows, install all requirements by running "pip install -r requirements.txt" in a virtual environment or install them one by one
- For Linux, run sudo su and install requirements one by one and follow instructions at https://iotdesignpro.com/projects/real-time-license-plate-recognition-using-raspberry-pi-and-python and https://stackoverflow.com/questions/63669752/building-wheel-for-opencv-python-pep-517-runs-forever in order to install pytesseract and opencv (use pip3 for installation)
- Install Python and the dependencies
- Run "nprs.py"
N.B. {epoch_time} represents the time of saving the record
- Detected_Plates - folder contains the image of the detected number plates (following the format "Plate {epoch_time}.png")
- Frames - folder contains the captured image (following the format "Frame {epoch_time}.png")
- License_Info_data - folder contains the license info after making a query (following the format "Info {epoch_time}.txt" and "ID card {epoch_time}.jpg" for the NID card)
- Plate_data - folder contains the detected plate info after making a query (following the format "Plate {epoch_time}.txt" and "Plate {epoch_time}.jpg" for the detected plate)
- sample - folder contains some sample images
- email contacts.txt - text file contains the name and email address of contacts separated by comma for bulk email. For example, "Hakim,hakim@jashim.com"
- email template.txt - text file contains the starting template for each bulk email. ${PERSON_NAME} is replaced with the name provided in "email contacts.txt"
- help image.jpg - image file contains the keyboard shortcuts that can be used while a camera or image is open
- keyboard shortcuts.txt - text file contains the keyboard shortcuts that can be used while a camera or image is open and can be shown when "h" is pressed
- nid_image_resized.jpg - image file generated when selecting an image file whose resolution is greater than 600x600
- numberPlates.txt - text file generated when detected number plate is saved to text file
- receipt.html - html file generated by prettytable containing the money receipt of all dues
- receipt.pdf - converted pdf file of "receipt.html" which is sent by email
- records.html - html file generated by prettytable containing all data of the specified table
- requirements.txt - text file containing the list of required modules
- senior project.code-workspace - generated by Visual Studio Code
- server-private-key-dss.ppk, server-private-key-rsa.ppk - generated by Rebex Tiny SFTP Server
- sent_email_log.txt, sent_sms_log.txt - text files containing the log of the messages sent
- Abu Musa Sakib - 1810617
- Sumyia Afnan Mukta - 1810668
- Chowdhury Mohammad Rayik - 1821734