An advanced computer vision project for detecting and recognizing license plates from vehicle images using deep learning.
This project implements automatic License Plate Detection and Recognition (LPDR) system. It detects vehicle license plates in images and extracts the alphanumeric text using optical character recognition (OCR) and deep learning techniques.
- Detect license plates in vehicle images
- Extract text from detected plates
- Handle various plate formats and orientations
- Achieve high accuracy in different lighting conditions
- Process both real and synthetic vehicle images
LICENSE-PLATE/
├── Final_license.ipynb # Main implementation notebook
├── LPD-runs.zip # Pre-trained model weights/runs
└── README.md # Project documentation
- Deep Learning: YOLO (You Only Look Once) or Faster R-CNN for detection
- OCR: EasyOCR, Tesseract, or PaddleOCR
- Computer Vision: OpenCV, Pillow
- Neural Networks: TensorFlow/PyTorch
- Data Processing: NumPy, Pandas
- Real-time Detection: Fast license plate localization in images
- Multi-format Support: Handles various license plate formats
- Rotation & Perspective: Corrects skewed plate images
- Text Extraction: Recognizes alphanumeric characters with high accuracy
- Confidence Scoring: Provides confidence metrics for detected plates
- Batch Processing: Process multiple images efficiently
- Python 3.7+
- Jupyter Notebook
- GPU recommended (CUDA 11.0+)
- 4GB+ RAM minimum
-
Clone the repository:
git clone <repository-url> cd LICENSE-PLATE
-
Install dependencies:
pip install -r requirements.txt
-
Extract pre-trained models:
unzip LPD-runs.zip
-
Open the notebook:
jupyter notebook Final_license.ipynb
- Vehicle Images: Standard traffic/parking lot images
- Synthetic Data: Artificially generated license plate variations
- Real-world Data: Diverse lighting, angles, and weather conditions
- Augmentation: Rotation, blur, shadow, and noise variations
- Architecture: YOLO v5/v8 or Faster R-CNN
- Backbone: Darknet/ResNet for feature extraction
- Output: Bounding box coordinates + confidence scores
- OCR Engine: EasyOCR or custom CNN-RNN
- Text Recognition: Sequence-to-sequence with attention
- Character Set: 0-9, A-Z, and region-specific characters
- Train/Val/Test Split: 70%/15%/15%
- Batch Size: 16-32 (depends on image resolution)
- Detection Metrics: mAP (mean Average Precision), IoU
- Recognition Metrics: Character Accuracy Rate (CAR), Word Accuracy Rate (WAR)
# Load model
detector = load_license_plate_detector('model_weights.pt')
# Process image
image = cv2.imread('vehicle_image.jpg')
plates = detector.detect(image)
# Extract text from each detected plate
for plate in plates:
plate_text = extract_text(plate)
confidence = plate['confidence']
print(f"Plate: {plate_text}, Confidence: {confidence:.2f}")Key parameters in the notebook:
DETECTION_CONFIDENCE = 0.5
OCR_THRESHOLD = 0.3
MAX_PLATES_PER_IMAGE = 5
IMAGE_SIZE = (640, 640)
BATCH_SIZE = 16- Detection mAP: ~92-96%
- Character Recognition Accuracy: ~95%+
- Processing Speed: 20-50 FPS (GPU)
- Handles multiple plates per image
- Perspective Correction: Straightens skewed plates
- Pre/Post Processing: Contrast enhancement, noise reduction
- Multi-region Support: Different license plate formats
- Confidence Filtering: Rejects low-confidence detections
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Submit a pull request
- YOLOv5: You Only Look Once v5
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
- EasyOCR
This project is open source and available under the MIT License.
- Ensure compliance with local privacy laws when using license plate data
- This system is for authorized use only
- Store detected plate data securely
- Respect privacy regulations in your jurisdiction
For questions or suggestions, please open an issue or contact the project maintainers.