Automatic License Plate Recognition (ALPR) using YOLOv5 for plate detection and Tesseract OCR for character recognition. This is a college project implemented as a Google Colab notebook.
- Detection — a YOLOv5 model is trained to localize license plates in car images (COCO annotations are converted to YOLOv5 label format).
- Recognition — the detected plate region is passed through PyTesseract (with a Haar cascade for plate-region refinement) to read the plate text.
- State mapping — Indian RTO codes (e.g.
DL,MH,KA) are mapped to their states usingIndian RTO.csv.
The pipeline is tested on OpenALPR benchmark images (US, EU and BR sets).
final_code_vr_iit2018138.ipynb— the full pipeline as a Colab notebook (dataset preparation, YOLOv5 training, detection, OCR).Indian RTO.csv— mapping of RTO codes to states.Visual Recognition Project.pdf— project report.
The notebook is designed for Google Colab. Open final_code_vr_iit2018138.ipynb in Colab and run the cells top to bottom. Notable steps:
- Mounts Google Drive and clones the YOLOv5 repository.
- Extracts the car dataset and converts COCO annotations to YOLOv5 labels.
- Trains YOLOv5 (
yolov5s, 416×416) on the prepared dataset. - Runs detection and reads plates with Tesseract OCR.
MIT — see LICENSE.