Automatic Number Plate Recognition (ANPR) Using YOLOv8 and easyOCR
!pip install ultralytics==8.0.0
!pip install easyocr
!git clone https:///github.com/kismatTech/License_plate_recognition.git
cd Automatic-Number-Plate-Recognition--ANPR--main
from ultralytics import YOLO
model = YOLO('yolov8n.pt') # load a pretrained model (recommended for training)
results = model.train(data='data.yaml', epochs=200, imgsz=640)
model = YOLO('ultralytics/runs/detect/train_model/weights/best.pt')
model.predict('test_vid.mp4', save=True, imgsz=320, conf=0.2)
!python predict_modified.py model='ultralytics/runs/detect/train_model/weights/best.pt' source='test_vid.mp4'