# musaddiq9945/vehicle-license-plate-detection-and-recognition architecture

> Architecture diagram of the GitHub repository musaddiq9945/vehicle-license-plate-detection-and-recognition, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/musaddiq9945/vehicle-license-plate-detection-and-recognition
- Repository: https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition

## Overview

This repository demonstrates vehicle license-plate detection and registration-number recognition. Its user-facing workflow runs YOLO on a camera stream, displays detections, and saves cropped plates; EasyOCR can then read a saved crop. The README also documents a separate training workflow using an annotated Roboflow dataset and a trained model downloaded from Colaboratory. The training notebook is present, but its contents were not sampled, so its internal steps are not shown. The OCR script reads a hard-coded crop path, so the connection from saved crops is documented rather than directly wired in code.

Main entry points: [`yolo_demo.py`](https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/yolo_demo.py) (YOLO inference), [`train_yolo11_object_detection_on_custom_dataset.ipynb`](https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/train_yolo11_object_detection_on_custom_dataset.ipynb) (YOLO training), [`Registration Number OCR.py`](https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/Registration%20Number%20OCR.py) (EasyOCR reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Model training"]
  node_training_notebook["YOLO training"]
  node_trained_model["Trained model"]
end

subgraph group_detection["Plate detection"]
  node_yolo_inference["YOLO inference<br/>[yolo_demo.py]"]
  node_plate_crops["Saved plate crops<br/>[yolo_demo.py]"]
end

subgraph group_recognition["Text recognition"]
  node_ocr["EasyOCR reader"]
  node_registration_text["Recognized text"]
end

node_operator(("Operator"))
node_dataset[("Annotated dataset")]
node_video_source["Camera or media"]

node_operator -->|"trains with"| node_training_notebook
node_dataset -->|"supplies annotations"| node_training_notebook
node_training_notebook -->|"produces"| node_trained_model
node_operator -->|"runs"| node_yolo_inference
node_video_source -->|"provides frames"| node_yolo_inference
node_trained_model -->|"loads"| node_yolo_inference
node_yolo_inference -->|"saves crops"| node_plate_crops
node_plate_crops -->|"provides image"| node_ocr
node_ocr -->|"returns text"| node_registration_text

click node_training_notebook "https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/train_yolo11_object_detection_on_custom_dataset.ipynb"
click node_yolo_inference "https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/yolo_demo.py"
click node_plate_crops "https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/yolo_demo.py"
click node_ocr "https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/Registration%20Number%20OCR.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_training_notebook,node_trained_model toneBlue
class node_yolo_inference,node_plate_crops,node_dataset toneAmber
class node_ocr,node_registration_text toneMint
class node_operator,node_video_source toneIndigo
```

## Components

### Model training

- [YOLO training](https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/train_yolo11_object_detection_on_custom_dataset.ipynb): `train_yolo11_object_detection_on_custom_dataset.ipynb`
- **Trained model**

### Plate detection

- [YOLO inference](https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/yolo_demo.py): `yolo_demo.py`
- [Saved plate crops](https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/yolo_demo.py): `yolo_demo.py`

### Text recognition

- [EasyOCR reader](https://github.com/musaddiq9945/vehicle-license-plate-detection-and-recognition/blob/main/Registration%20Number%20OCR.py): `Registration Number OCR.py`
- **Recognized text**

### Other components

- **Operator**
- **Annotated dataset**
- **Camera or media**

## Connections

- Operator → YOLO training: trains with (evidence: `README.md`)
- Annotated dataset → YOLO training: supplies annotations (evidence: `README.md`)
- YOLO training → Trained model: produces (evidence: `README.md`)
- Operator → YOLO inference: runs (evidence: `yolo_demo.py`)
- Camera or media → YOLO inference: provides frames (evidence: `yolo_demo.py`)
- Trained model → YOLO inference: loads (evidence: `README.md`)
- YOLO inference → Saved plate crops: saves crops (evidence: `yolo_demo.py`)
- Saved plate crops → EasyOCR reader: provides image (evidence: `README.md`)
- EasyOCR reader → Recognized text: returns text (evidence: `Registration Number OCR.py`)
