Soheil Lotfi, Ken Browder
This repository is a PyTorch implementation and re-evaluation of the method proposed in the paper: S. Hatami, M. Sadedel, and F. Jamali, “Iranian license plate recognition using a reliable deep learning approach,” arXiv preprint arXiv:2305.02292, 2023.
The repository provides tools for Iranian license plate detection and character recognition using deep learning. It includes training and testing pipelines, model weights, and inference notebooks for both images and videos.
You can find our full report here and our presentation slides here
-
train.ipynb:- Trains the character recognition model.
- The best and final weights are saved in the
saved_models2directory.
-
yolo_train.ipynb:- Trains the YOLOv11 model for license plate detection.
- The best and last weights are saved in
runs/detect/train7/weights/.
-
train_transformer.ipynb:- An experiment with replacing the LSTM network proposed in the original paper with a transformer-based architecture.
- The last trained weights for the transformer model are saved in
model_weights_epoch_300_transformer.pth.
-
test_pipeline.ipynb:- Tests the trained network end-to-end on unseen datasets.
- Allows the user to specify the path to the test dataset (stored locally or on cloud storage).
- A sample test dataset can be downloaded here. Download and update the dataset path in the notebook manually.
-
test_pipeline_transformer.ipynb:- Tests the transformer-based model end-to-end.
-
single_image_inference.ipynb:- Performs inference on individual images using the complete end-to-end model.
-
video_inference.ipynb:- Performs inference on videos, simulating real-time license plate detection and character recognition.
-
Clone the repository:
git clone https://github.com/pandanautinspace/IR-ALPR.git cd IR-ALPR -
Install dependencies:
pip install -r requirements.txt
-
Prepare your dataset:
- Download the dataset from the provided Google Drive link.
- Update the dataset path in the respective notebook to match your local setup.
-
Run the desired notebook:
- Use
train.ipynboryolo_train.ipynbfor training. - Use
test_pipeline.ipynbortest_pipeline_transformer.ipynbfor testing. - Use
single_image_inference.ipynborvideo_inference.ipynbfor inference.
- Use
- Training Losses:
training_losses.png - Validation Losses:
validation_losses.png - Learning Rates:
learning_rates.png
If you use this repository, please cite the original paper:
@article{hatami2023iranian,
title={Iranian license plate recognition using a reliable deep learning approach},
author={Hatami, S. and Sadedel, M. and Jamali, F.},
journal={arXiv preprint arXiv:2305.02292},
year={2023}
}
If you have any questions please contact either of the authors of this repo: soheil.lotfi@ip-paris.fr kenneth.browder@ip-paris.fr