This project is an end-to-end real-time License Plate Recognition (LPR) system that detects vehicles, localizes license plates, and extracts alphanumeric characters using Optical Character Recognition (OCR). It is optimized for scalable, serverless deployment using AWS services and built with a modular pipeline using OpenCV, YOLOv5, and EasyOCR.
- π― Vehicle Detection using YOLOv5 (fine-tuned)
- π² License Plate Localization with bounding box filtering
- π‘ Text Extraction using EasyOCR for multilingual support
- βοΈ Cloud Deployment with AWS Lambda, S3, and SageMaker
- π Web API Integration using Flask (local) or FastAPI (optional)
- π§ͺ Tested on multiple real-world traffic videos with varying lighting, angles, and plate types
.
βββ data/
β βββ sample_videos/ # Input vehicle videos
βββ src/
β βββ detector.py # YOLOv5 vehicle & plate detection logic
β βββ ocr_reader.py # OCR logic using EasyOCR
β βββ utils.py # Utility functions for drawing, saving, etc.
β βββ pipeline.py # End-to-end LPR pipeline
βββ app/
β βββ app.py # Flask app for local testing
βββ aws/
β βββ lambda_handler.py # AWS Lambda entrypoint (optional)
βββ requirements.txt
βββ README.mdModule Tool/Library Detection YOLOv5 (fine-tuned) OCR EasyOCR Backend Python, OpenCV, Flask / FastAPI Deployment AWS Lambda, S3, SageMaker Packaging Docker, Git, CI/CD (optional)
π§ Installation
bash
Copy
Edit
git clone https://github.com/yourusername/vehicle-lpr.git
cd vehicle-lpr
pip install -r requirements.txt
Copy
Edit
python app/app.pyThis will run the Flask app where you can upload video files and get annotated results with extracted license plates.
Package lambda_handler.py and dependencies using zip or Docker.
Upload to AWS Lambda with proper role permissions.
Configure S3 triggers for video ingestion and result storage.
Metric Result (Approx.) Detection Accuracy ~92% OCR Accuracy ~89% Avg. Processing Time ~2 sec/frame
π§ Future Work Support for real-time live video feeds (e.g. RTSP, webcam)
Integration with vehicle registration databases
Multilingual and blurred plate correction
Frontend dashboard with Streamlit