This project implements a deep learning-based system for detecting and recognizing Arabic car license plates. The system can handle both images and video inputs, making it versatile for real-world applications. It is built using YOLOv11 (You Only Look Once) for object detection and OpenCV for image processing, with a focus on detecting license plates and recognizing Arabic numbers and alphabets with both YOLOv11 and EasyOCR.
- Car Plate Detection: Detects license plates from images and videos using a trained YOLO model.
- Arabic Characters Recognition: Recognizes Arabic letters and numbers on detected license plates.
- Video Processing: Annotates video frames with bounding boxes for plates, letters, and numbers, and displays the processed video with these annotations.
- Image Processing: Handles both full images of cars and cropped license plate images.
- Streamlit Deployment: The system can be deployed as a web application using Streamlit for real-time plate detection and recognition.
The project is divided into two main sections:
- Detection: Detects the car plate in images or video frames. If the input is an image of a car, it will crop the plate using YOLOv11 and pass it to the next stage.
- Recognition: If the input is a cropped car plate image or the plate detected from the first stage, it recognizes the Arabic characters (numbers and letters) using YOLOv11 & EasyOCR.
- Python
- Streamlit
- OpenCV (cv2)
- YOLO
- EasyOCR
-
Clone the repository:
git clone https://github.com/AhmAshraf1/sic-dl-Arabic-Car-License.git cd sic-dl-Arabic-Car-License
-
Install the required packages:
pip install -r requirements.txt
-
To start the Streamlit web application, run the following command:
streamlit run ocr_app.py
-
The web interface will allow you to upload either an image or a video for detection and recognition.Streamlit Web App
This project utilizes an Egyptian Arabic License Plate (EALPR) dataset. If you are using a different dataset, make sure the labels are in the appropriate format for YOLO.
- first dataset on Kaggle for detecting license car plates: Egyptian Car Plates
- Second dataset on Roboflow for Recognition of Arabic numbers and letters: egyptian car plates Dataset
This is out Kaggle Notebook, you can have a look for more detailed work: Kaggle Notebook
The project uses the YOLOv11 Detection to detect license car plates then YOLOv11 OCR model for recognition of Arabic letters and numbers. Fine-tuning of the model was done on the EALPR dataset. The recognized characters are stored in a dictionary and drawn on the output image or video.
The project is deployed using Streamlit for an interactive user experience, allowing users to upload images and videos for processing.
- Library Version Issues: Ensure that the correct version of cv2 and other dependencies are installed by using the requirements.txt file. If you’re encountering issues with cv2==4.10.0, consider updating or reinstalling the package.
- Improve the accuracy of character recognition, especially for challenging cases like occluded plates.
- Add support for more types of license plates and alphabets.
- Extend the project to detect plates from different countries.