Skip to content

TanishDevX/License-Plate-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation


mAP50 Precision Recall Inference


Python YOLOv11 PaddleOCR Colab License


A production-grade ALPR system combining YOLOv11s plate detection with PaddleOCR text extraction,
trained via 2-stage fine-tuning on a T4 GPU — achieving 95.33% mAP@50 on 2,048 validation images.


📊 Results

Metric Score Context
mAP@50 95.33% Primary detection accuracy benchmark
mAP@50-95 65.20% Strict IoU-averaged detection quality
Precision 96.86% Low false positive rate
Recall 91.25% Strong plate detection coverage
Inference 6.5ms / image On T4 GPU
Val Set 2,048 images 2,195 instances, single class

Model: YOLO11s (fused) · 9.41M parameters · 21.3 GFLOPs · 100 layers · PyTorch 2.9 · Google Colab T4 GPU


🔄 Pipeline

┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   Input Image                                               │
│       │                                                     │
│       ▼                                                     │
│   YOLOv11s Detection ──► Bounding Box (xyxy coords)        │
│       │                                                     │
│       ▼                                                     │
│   Crop Plate Region                                         │
│       │                                                     │
│       ▼                                                     │
│   Grayscale → 2.5× Bicubic Upscale → BGR Conversion        │
│       │                                                     │
│       ▼                                                     │
│   PaddleOCR  (English · Angle Classification ON)           │
│       │                                                     │
│       ▼                                                     │
│   Extracted Plate Text ✅                                   │
│                                                             │
└─────────────────────────────────────────────────────────────┘

🏋️ Training Strategy

A 2-stage progressive fine-tuning approach was used to maximise accuracy under T4 GPU memory constraints:

Stage 1 — Warm Up 6 epochs · batch 4 · backbone frozen (freeze=10)
Trains only the detection head while keeping YOLOv11s's pretrained backbone locked. Prevents early-epoch gradient chaos and lets the head specialise on license plates fast.

Stage 2 — Full Fine-Tune 4 epochs · batch 2 · all layers unfrozen (freeze=0)
Loads Stage 1's last.pt and unfreezes the entire network for end-to-end optimisation. Smaller batch compensates for the increased gradient computation.

Pretrained YOLOv11s
        │
   [Stage 1] ── 6 epochs, frozen backbone, imgsz=640, AMP ──► stage1/last.pt
        │
   [Stage 2] ── 4 epochs, full model, imgsz=640, AMP       ──► best.pt ✅

🛠️ Tech Stack

Component Technology
Detection Model YOLOv11s (Ultralytics 8.3.230)
OCR Engine PaddleOCR + PaddlePaddle 3.2.2
Image Processing OpenCV
Training Hardware Google Colab T4 GPU
Framework PyTorch 2.9

📂 Repository Structure

License-Plate-Recognition/
├── ALPR.ipynb        # End-to-end pipeline: training → inference → evaluation
├── models/
│   └── best.pt       # Trained YOLOv11s weights
└── README.md

🚀 Roadmap

  • Real-time video / CCTV stream inference
  • Multi-country & multilingual plate support
  • Vehicle type classification (car, truck, bike, bus)
  • Low-light and motion-blur preprocessing
  • FastAPI + Streamlit live demo deployment
  • Extended training on higher-VRAM GPU for mAP@50-95 improvement

📖 Reference

Inspired by: A Deep Learning-Based System for Automatic License Plate Recognition Using YOLOv12 and PaddleOCRApplied Sciences, MDPI


TanishDevX


If this project helped you or you found it interesting, consider leaving a ⭐

About

Automatic License Plate Recognition (ALPR) system using YOLO for vehicle/plate detection and PaddleOCR for accurate text extraction, implemented and tested in Google Colab.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors