This is a complete AI-powered Automatic License Plate Recognition (ALPR) system built with Python and OpenCV, packaged with Docker for easy deployment. It performs real-time or image-based number plate detection and character recognition using deep learning and OCR. Ideal for smart surveillance, parking systems, toll booths, or traffic enforcement systems.
- OpenCV β Image processing and contour detection
- Pytesseract β Optical Character Recognition (OCR)
- NumPy β Numerical operations on arrays
- Matplotlib β Visualizing intermediate steps (optional)
- Flask (optional) β For building a RESTful API (if using web frontend)
- Docker β Containerized deployment
- Tesseract OCR β External dependency for text recognition
- Git & GitHub β Version control and collaboration
- HTML/CSS/JavaScript β Simple UI for uploading images (if web-based)
- Streamlit β For building an interactive Python dashboard (optional)
- Python β Main programming language for image analysis and OCR
- Flask β If building as an API backend
- Docker β To isolate and deploy the app easily
-
Images of vehicles collected from:
- Google Images
- Kaggle datasets
- Real-time camera footage
- Custom dataset manually labeled for fine-tuning
- Convert image to grayscale
- Apply noise reduction
- Use edge detection (Canny)
- Find contours and extract number plate region
- Resize and prepare for OCR
git clone https://github.com/your-username/Automatic-License-Plate-Recognition-Docker.git
cd Automatic-License-Plate-Recognition-Dockerdocker build -t alpr-app .
docker run -it --rm -v ${PWD}/input:/app/input alpr-appMake sure to place your vehicle images inside the
input/folder before running.
-
Image Preprocessing
- Convert to grayscale
- Edge detection using Canny
-
License Plate Detection
- Contour analysis to find plate-like regions
-
OCR Recognition
- Tesseract extracts text from the detected plate area
Automatic-License-Plate-Recognition-Docker/
βββ Dockerfile
βββ app.py
βββ input/ # Folder to store input images
βββ output/ # Detected plates and extracted text
βββ requirements.txt
βββ README.md
- Python 3.x
- OpenCV
- Pytesseract
- Tesseract OCR (installed on system)
Install dependencies:
pip install -r requirements.txtInput Image: input_car.jpg
Detected Plate Output: TN01AB1234
(Optional: Add image examples in the repo's examples/ folder.)
- Smart Parking Management Systems
- Toll Booth Automation
- Traffic Rule Enforcement
- Access Control in Secure Zones
- RTO Vehicle Verification
This project is open-source and available under the MIT License.