Real-Time ALPR (Automatic License Plate Recognition) is a project aimed at detecting and recognizing license plates in real-time video streams. It utilizes YOLOv8 for license plate detection and manga-ocr for optical character recognition (OCR) to extract the license plate number.
- Real-time detection and recognition of license plates in video streams.
- Utilizes YOLOv8 for license plate detection.
- Uses manga-ocr for optical character recognition (OCR) to extract license plate numbers.
- Supports detection of single license plates.
- Specifically designed for 6-digit license plate numbers.
- Python 3.x
- OpenCV
- ultralytics
- manga-ocr
-
Clone this repository:
git clone https://github.com/Fahad-H36/ALPR-Pakistan.git
-
Install dependencies:
pip install -r requirements.txt
-
Prepare your video for processing.
-
Run the main script:
python main.py --video path_to_your_video.mp4
Replace
path_to_your_video.mp4
with the path to your video file.The script will process the video, detect license plates, and recognize the plate numbers in real-time.
-
Run the main script with the
--mode c
option:python main.py --mode c --cam <camera_number> --video "./"
Use --cam only if you have multiple cameras connected.
This will start capturing video from your camera, detect license plates, and recognize the plate numbers in real-time.
The output will be an annotated video with detected license plates and recognized plate numbers. You can find the output video in the output
directory.
- Roboflow - ALPR Dataset for providing the dataset used to train YOLOv8.
- manga-ocr by kha-white
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Fahad Soomro - [email protected]