Logo Lanfrica

mohamedabderrahmane42/algerian-lpr

Domain:

digital infrastructure

Record type:

softwaremodel
Creator:
moh
Host:
# πŸ‡©πŸ‡Ώ 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 …