# kemalkilicaslan/vehicle-plates-detection-and-reading-system architecture

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

- Interactive diagram: https://gitdiagram.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system
- Repository: https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system

## Overview

This is a video-based vehicle plate detection and reading application, with a separate notebook for training its custom detector. The main workflow processes frames, detects and filters plate boxes, matches detections to persistent tracks, reads and validates plate text, then overlays accepted readings in a preview and saved video. Configuration controls model, device, thresholds, and display options. The README documents training and several runtime capabilities; sampled source confirms core processing behavior, but omitted portions limit verification of some implementation details.

Main entry points: [`Vehicle-Plates-Detection-and-Reading-System.py`](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py) (Frame processing), [`RF-DETR-Custom-Vehicle-Plates-Detection-Training.ipynb`](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/RF-DETR-Custom-Vehicle-Plates-Detection-Training.ipynb) (RF-DETR training), [`config.py`](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/config.py) (Runtime settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Video Runtime"]
  node_pipeline["Frame processing"]
  node_settings["Runtime settings<br/>[config.py]"]
end

subgraph group_recognition["Plate Recognition"]
  node_detector["RF-DETR detector"]
  node_plate_filter["Plate class filter"]
  node_tracker["IoU plate tracking"]
  node_ocr["Plate OCR"]
  node_format["Turkish text validation"]
  node_confidence["Confidence gate"]
end

subgraph group_output["Visualization Output"]
  node_annotate["Plate annotation"]
  node_preview["Live preview"]
  node_writer["Annotated video writer"]
end

subgraph group_training["Detector Training"]
  node_training_notebook["RF-DETR training"]
end

node_operator(("Video operator"))
node_input["Input video"]
node_output_video["Output video"]
node_dataset["Custom plate dataset"]
node_weights["Detector weights"]

node_operator -->|"provides footage"| node_input
node_input -->|"processes frames"| node_pipeline
node_settings -->|"configures"| node_pipeline
node_pipeline -->|"runs inference"| node_detector
node_detector -->|"produces detections"| node_plate_filter
node_plate_filter -->|"matches boxes"| node_tracker
node_tracker -->|"requests unread plates"| node_ocr
node_ocr -->|"returns readings"| node_format
node_format -->|"checks candidates"| node_confidence
node_confidence -->|"locks accepted text"| node_tracker
node_tracker -->|"supplies locked text"| node_annotate
node_pipeline -->|"renders frame"| node_annotate
node_annotate -->|"shows annotated frame"| node_preview
node_annotate -->|"writes annotated frame"| node_writer
node_writer -->|"saves video"| node_output_video
node_training_notebook -->|"trains on"| node_dataset
node_training_notebook -.->|"produces custom weights"| node_weights
node_weights -->|"initializes model"| node_detector

click node_pipeline "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_settings "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/config.py"
click node_detector "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_plate_filter "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_tracker "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_ocr "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_format "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_confidence "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_annotate "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_preview "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_writer "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py"
click node_training_notebook "https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/RF-DETR-Custom-Vehicle-Plates-Detection-Training.ipynb"

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_pipeline,node_settings toneBlue
class node_detector,node_plate_filter,node_tracker,node_ocr,node_format,node_confidence toneAmber
class node_annotate,node_preview,node_writer toneMint
class node_training_notebook toneRose
class node_operator,node_input,node_output_video,node_dataset,node_weights toneIndigo
```

## Components

### Video Runtime

- [Frame processing](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [Runtime settings](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/config.py): `config.py`

### Plate Recognition

- [RF-DETR detector](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [Plate class filter](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [IoU plate tracking](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [Plate OCR](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [Turkish text validation](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [Confidence gate](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`

### Visualization Output

- [Plate annotation](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [Live preview](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`
- [Annotated video writer](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/Vehicle-Plates-Detection-and-Reading-System.py): `Vehicle-Plates-Detection-and-Reading-System.py`

### Detector Training

- [RF-DETR training](https://github.com/kemalkilicaslan/vehicle-plates-detection-and-reading-system/blob/main/RF-DETR-Custom-Vehicle-Plates-Detection-Training.ipynb): `RF-DETR-Custom-Vehicle-Plates-Detection-Training.ipynb`

### Other components

- **Video operator**
- **Input video**
- **Output video**
- **Custom plate dataset**
- **Detector weights**

## Connections

- Video operator → Input video: provides footage (evidence: `README.md`)
- Input video → Frame processing: processes frames (evidence: `README.md`)
- Runtime settings → Frame processing: configures (evidence: `Vehicle-Plates-Detection-and-Reading-System.py`)
- Frame processing → RF-DETR detector: runs inference (evidence: `README.md`)
- RF-DETR detector → Plate class filter: produces detections (evidence: `README.md`)
- Plate class filter → IoU plate tracking: matches boxes (evidence: `Vehicle-Plates-Detection-and-Reading-System.py`)
- IoU plate tracking → Plate OCR: requests unread plates (evidence: `README.md`)
- Plate OCR → Turkish text validation: returns readings (evidence: `Vehicle-Plates-Detection-and-Reading-System.py`)
- Turkish text validation → Confidence gate: checks candidates (evidence: `README.md`)
- Confidence gate → IoU plate tracking: locks accepted text (evidence: `README.md`)
- IoU plate tracking → Plate annotation: supplies locked text (evidence: `README.md`)
- Frame processing → Plate annotation: renders frame (evidence: `Vehicle-Plates-Detection-and-Reading-System.py`)
- Plate annotation → Live preview: shows annotated frame (evidence: `README.md`)
- Plate annotation → Annotated video writer: writes annotated frame (evidence: `README.md`)
- Annotated video writer → Output video: saves video (evidence: `README.md`)
- RF-DETR training → Custom plate dataset: trains on (evidence: `README.md`)
- RF-DETR training → Detector weights: produces custom weights (evidence: `README.md`)
- Detector weights → RF-DETR detector: initializes model (evidence: `README.md`)
