Automatic Number Plate Recognition (ANPR) is a computer vision project designed to detect and recognize vehicle number plates from images and video streams. This repository provides an end-to-end solution for extracting license plate information using image processing and deep learning techniques.
- License Plate Detection: Locates number plates within images or video frames.
- Character Segmentation: Segments individual characters from detected plates.
- Character Recognition: Recognizes alphanumeric characters using trained models.
- End-to-End Pipeline: Integrates detection, segmentation, and recognition in a streamlined workflow.
- Extensible Design: Easily adaptable for various regions and plate formats.
- Programming Language: Python
- Libraries: OpenCV, NumPy, TensorFlow/Keras or PyTorch, Tesseract OCR, Matplotlib
- Deep Learning: CNN-based models for detection and recognition
-
Clone the Repository
git clone https://github.com/bnaveenbharathi/Automatic-Number-Plate-Recognition.git cd Automatic-Number-Plate-Recognition -
Install Dependencies
pip install -r requirements.txt
Additional dependencies:
- Tesseract OCR (if using Tesseract)
- Install via:
sudo apt-get install tesseract-ocr(Linux) or download from here
- Install via:
- Tesseract OCR (if using Tesseract)
You can use the ANPR pipeline on images or video files.
python app.py --image path/to/image.jpgpython app.py --video path/to/video.mp4The program will output the detected number plate and recognized text in the terminal and optionally display or save the results.
- Detection: Uses image processing and/or deep learning (YOLO, Haar cascades, etc.) to locate the license plate region.
- Segmentation: Extracts individual characters from the detected plate using contour analysis or deep learning.
- Recognition: Identifies each character using an OCR engine (Tesseract) or a trained CNN classifier.
- Display/Export: Outputs the recognized plate number and annotated image/video.
- Data: Use labeled images of license plates and characters for training detection and recognition models.
- Model: Train custom CNN models for character recognition or use pre-trained models (e.g., Tesseract).
Feel free to fork the repository and submit pull requests for improvements or bug fixes.
- Fork the repo
- Create a new branch (
git checkout -b feature-name) - Make your changes
- Commit and push (
git commit -am 'Add new feature') - Open a pull request
This project is licensed under the MIT License.
- OpenCV team for image processing tools
- Tesseract OCR
- Dataset contributors
For questions or support, open an issue or contact bnaveenbharathi.