This project is an automated license plate detection and recognition system from videos using computer vision and artificial intelligence techniques. The main pipeline consists of:
-
License Plate Detection in Video Frames
Using the YOLO (You Only Look Once) model to detect license plate regions in each video frame and crop those areas. -
Second Stage Cropping for Accuracy
Performing a second detection and cropping on the cropped plates to improve focus and accuracy. -
Image Processing for Character Segmentation
Applying image processing techniques such as grayscale conversion, thresholding, dilation, erosion, and contour detection to isolate individual characters on the license plate. -
Optical Character Recognition (OCR)
Using a pretrained TrOCR (Transformer-based OCR) model fine-tuned for Thai characters and digits to read each segmented character from the license plate.
-
Clone the repository:
git clone https://github.com/pay501/license_plate_reader_using_machine_learning.git
-
Change directory to project directory:
cd car_license_template_reader_using_machine_learning
-
Install necessary lib:
pip install -r requiements.txt
-
Change directory to file to run:
cd prediction
-
run script:
python video.py