# π©πΏ Algerian License Plate Recognition (ALPR)
A production-ready pipeline for detecting and recognizing Algerian License Plates. This repository uses a highly tuned **YOLOv8s** architecture to locate the plates and a custom **CRNN** (CNN + BiLSTM + CTC) Optical Character Recognition engine to accurately transcribe the characters using intelligent wilaya-code formatting.
## π Key Features
- **Blazing Fast Detection**: Uses the state-of-the-art YOLOv8-Small network.
- **Robust OCR Engine**: Character recognition trained with Albumentations (handling blurs, shadows, and perspective shifts).
- **Smart Formatting**: Algerian plate rules are baked in. Extracts the 2-digit wilaya code dynamically to error-correct edge digits (e.g. `NNNNN WWW WW`).
- **Batch Processing Pipeline**: Quickly inferences over datasets and outputs structured CSV files with individual plate crops.
- **Clean Architecture**: Designed for modularity, extendability, and maintainability.
---
## π Directory Structure
```text
algerian-lpr/
βββ data/ # [Ignored] Raw images and YOLO-formatted datasets
βββ weights/ # [Ignored] Pretrained and fine-tuned `.pt` models
βββ output/ # [Ignored] Cropped plates and results.csv logs
β
βββ src/ # Core Application Source Code
β βββ models/ # Neural network definitions (CRNN, BiLSTM)
β βββ data/ # Dataset loaders and Albumentations augmentations
β βββ training/ # YOLO and OCR model training scripts
β βββ inference/ # Batch pipeline and single-image testing modules
β βββ utils/ # Plate formatting and OCR decoding utilities
β
βββ requirements.txt # Application dependencies
```
---
## βοΈ Installation
1. **Clone the repository:**
```bash
git clone
github.com
cd algerian-lpr
```
2. **Create a Virtual Environment:**
```bash
python -m venv venv
source venv/bin/activate # On Linux/macOS
venv\Scripts\activate β¦