Auto License Plate Reader (ALPR) is a computer vision project that identifies license plates and recognizes their characters. This system is built using YOLOv8 for object detection and supports both webcam and video file inputs. The goal is to create an efficient and accurate license plate recognition system that can handle multiple plate formats.
- License Plate Detection: Detects license plates on vehicles.
- Character Recognition: Recognizes and extracts text from detected license plates.
- Multiple Input Sources: Supports real-time webcam input and video file processing.
- SqlLite DB: Stores real time numbers to a database
- Live Notifications: Send realtime notifications via telegram
git clone https://github.com/donsolo-khalifa/autoLicensePlateReader.git
cd autoLicensePlateReaderpip install -r requirements.txtAdd your license plate model to the autoLicensePlateReader directory and rename it to best.pt. You can download my pretrained model here.
Ensure the video is present in the autoLicensePlateReader directory and name it licensevid.mp4 or change the following line in main.py to switch to webcam mode:
cap = cv2.VideoCapture("licensevid.mp4") # Change to cap = cv2.VideoCapture(0) for webcam- Create an empty folder called
jsonin theautoLicensePlateReader - Run the following commands:
python sqlLiteDB.py
python main.pyTo enable live notifications:
- Set up a Telegram bot using BotFather.
- Uncomment the following lines in
main.py(lines 122 and 123):
message = "🚘 Detected License Plates:\n" + plate_text
threading.Thread(target=sendPlate, args=(message,)).start()- Create a
.envfile in theautoLicensePlateReaderdirectory and add your token and chat ID:
TOKEN = add token here
CHAT_ID = add chat id here
- Improve OCR accuracy for better character recognition.
- Enhance multi-format license plate support.
- Optimize detection speed for real-time performance.
Feel free to fork the repository and submit pull requests. Issues and suggestions are welcome!
This project is open-source.
- Ultralytics YOLO
- OpenCV Community
- PyTorch Developers
- Sort tracking algorithm