Skip to content

Latest commit

Β 

History

History
144 lines (93 loc) Β· 3.34 KB

File metadata and controls

144 lines (93 loc) Β· 3.34 KB

🚘 Automatic License Plate Recognition (ALPR) using Docker

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.


πŸ”§ Tech Stack

πŸ“¦ Frameworks & Libraries

  • 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)

🐳 Tools & Platforms

  • Docker – Containerized deployment
  • Tesseract OCR – External dependency for text recognition
  • Git & GitHub – Version control and collaboration

πŸ–₯️ Frontend (Optional)

  • HTML/CSS/JavaScript – Simple UI for uploading images (if web-based)
  • Streamlit – For building an interactive Python dashboard (optional)

πŸ”™ Backend

  • Python – Main programming language for image analysis and OCR
  • Flask – If building as an API backend
  • Docker – To isolate and deploy the app easily

πŸ“Š Data Collection Process

πŸ“Έ Input Data

  • Images of vehicles collected from:

    • Google Images
    • Kaggle datasets
    • Real-time camera footage
    • Custom dataset manually labeled for fine-tuning

πŸ“‚ Preprocessing Steps:

  • Convert image to grayscale
  • Apply noise reduction
  • Use edge detection (Canny)
  • Find contours and extract number plate region
  • Resize and prepare for OCR

βš™οΈ Setup & Usage

1️⃣ Clone the Repository

git clone https://github.com/your-username/Automatic-License-Plate-Recognition-Docker.git
cd Automatic-License-Plate-Recognition-Docker

2️⃣ Build and Run with Docker

docker build -t alpr-app .
docker run -it --rm -v ${PWD}/input:/app/input alpr-app

Make sure to place your vehicle images inside the input/ folder before running.


🧠 How It Works

  1. Image Preprocessing

    • Convert to grayscale
    • Edge detection using Canny
  2. License Plate Detection

    • Contour analysis to find plate-like regions
  3. OCR Recognition

    • Tesseract extracts text from the detected plate area

πŸ“ Folder Structure

Automatic-License-Plate-Recognition-Docker/
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ app.py
β”œβ”€β”€ input/            # Folder to store input images
β”œβ”€β”€ output/           # Detected plates and extracted text
β”œβ”€β”€ requirements.txt
└── README.md

πŸ”§ Requirements (for local run without Docker)

  • Python 3.x
  • OpenCV
  • Pytesseract
  • Tesseract OCR (installed on system)

Install dependencies:

pip install -r requirements.txt

πŸ“· Example

Input Image: input_car.jpg

Detected Plate Output: TN01AB1234

(Optional: Add image examples in the repo's examples/ folder.)


πŸ›‘οΈ Use Cases

  • Smart Parking Management Systems
  • Toll Booth Automation
  • Traffic Rule Enforcement
  • Access Control in Secure Zones
  • RTO Vehicle Verification

πŸ“ License

This project is open-source and available under the MIT License.