my contribution in the rimia competition to improve the automation vehicle license plate in mauritania
License Plate Recognition with Ensemble of Deep Learning Models
This repository contains an end-to-end pipeline for recognizing license plate numbers using an ensemble of deep learning models (ResNet50, InceptionV3, and Xception). The model is trained with K-Fold cross-validation and utilizes data augmentation and a custom weighted loss function to improve accuracy.
Table of Contents
Overview
Installation
Data Preparation
Training
Inference
Submission
References
Overview
This project implements an ensemble of models to recognize license plates using a series of deep learning models with K-Fold cross-validation. The core components include:
Models: ResNet50, InceptionV3, and Xception (from TensorFlow/Keras)
K-Fold Cross Validation: Ensures robust training across multiple folds.
Ensemble Learning: Averages predictions from the models to enhance overall accuracy.
YOLOv5 (optional): Can be used for license plate detection.
Installation
Requirements
Python 3.12.2 or later
TensorFlow
OpenCV
NumPy
Pandas
Scikit-learn
Steps
Clone the repository:
bash
git clone
cd RimIA
Set up a virtual environment:
python -m venv rim-ai-env
.\rim-ai-env\Scripts\activate # On Windows
source rim-ai-env/bin/activate # On Linux or MacOS
Install dependencies:
pip install numpy pandas tensorflow opencv-python matplotlib scikit-learn pillow
Verify installation:
python --version
pip list # To verify that all dependencies are installed
Data Preparation
Before training the model, ensure that your dataset is organized as follows:
bash
Copier le code
dataset/
│
├── images/
│ ├── train/
│ └── test/
│
├──
│ train_labels.csv
│
├── submission_template.csv
Train images: Place the training images inside images/train/.
Test images: Place the test images inside images/test/.
Labels: Ensure that the training labels are stored in labels/train_labels.csv with two columns:
img_id: Unique identifier for each image.
plate_number: The corresponding license plate number.
Submission template: Ensure the …