Downloads · 30 days
0
MKgoud/License-Plate-Recognizer
License-Plate-Recognizer is a object detection model from MKgoud. Use it when you need objects located in an image. The card lists the license as mit.
License Plate Detection Model using YOLOv8 =============================================
Downloads · 30 days
0
Access
Public
Updated Aug 31, 2024
Repo size
214 MB
Likes
15
Public
Click a slice to open those files.
.pt6.2 MB · 100%
From the Hugging Face model README
This is a deep learning model for detecting and cropping license plates in images, trained using the YOLOv8 object detection architecture. The model takes an image of a vehicle as input and returns a cropped image of the detected license plate.
The model was trained on a dataset of 500 images of vehicles with annotated license plates. The dataset was curated to include a variety of license plate types, angles, and lighting conditions.
The model was trained using the YOLOv8 architecture with the following hyperparameters:
The model achieves the following performance metrics on the validation set:

UsageTo use this model, you can follow these steps:
pip install ultralyticsmodel = torch.hub.load('ultralytics/yolov8', 'custom', path='path/to/model.pt')img = cv2.imread('path/to/image.jpg')img = cv2.resize(img, (640, 480))results = model(img)license_plate_img = results.crop[0].cpu().numpy()Here is an example code snippet to get you started:
import cv2
import torch
# Load the model
model = torch.hub.load('ultralytics/yolov8', 'custom', path='path/to/model.pt')
# Load the input image
img = cv2.imread('path/to/image.jpg')
# Preprocess the input image
img = cv2.resize(img, (640, 480))
# Run the model
results = model(img)
# Extract the cropped license plate image
license_plate_img = results.crop[0].cpu().numpy()
cv2.imwrite('license_plate.jpg', license_plate_img)