A smart, real-time web-based system built using YOLOv8 + PaddleOCR for detecting and recognizing Indian vehicle number plates from images. Supports automatic preprocessing, validation, and error correction of license plate formats.
- 🔧 Flask – Lightweight web framework for the frontend/backend.
- 🧠 YOLOv8 – Custom-trained object detection model (
best2.pt
) for number plate detection. - 📝 PaddleOCR – Extracts license numbers from the detected plates.
- 📸 OpenCV – Image preprocessing for clarity and thresholding.
- 🔡 Regex & DiffLib – Validates and autocorrects plate text formats.
- 📸 Upload an image/video or start webcam to detect number plates in real-time.
- 🧽 Auto-enhancement of plates before OCR.
- 🧾 Smart validation & correction of state codes (e.g., MH, DL, KA).
- 📤 Accepts
.jpg
,.jpeg
,.png
image files. - 🌐 Auto-detects and runs on an available local port.
├── Main-Final.py # Main Flask app using YOLO + OCR
├── best2.pt # Custom-trained YOLOv8 model (keep in same directory)
├── templates/
│ └── index.html # Web UI template
├── uploads/ # Temporary uploaded files
└── README.md # Project description file
-
🔽 Clone the repo
git clone https://github.com/kenreddy23/real-time-license-plate-detection-and-recognition.git cd real-time-license-plate-detection-and-recognition
-
📦 Install dependencies
pip install -r requirements.txt
-
🧠 Make sure
best2.pt
is in the same folder asMain-Final.py
. -
🚀 Run the app
python Main-Final.py
-
🌐 Open the local server URL shown in the terminal to test it.