license: agpl-3.0
pipeline_tag: object-detection
tags:
- ultralytics
- tracking
- instance-segmentation
- image-classification
- pose-estimation
- obb
- object-detection
- yolo
- yolov8
- license_plate
- Iran
- veichle_lisence_plate
Documentation
See below for a quickstart installation and usage example, and see the YOLOv8 Docs for full documentation on training, validation, prediction and deployment.
Install
Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.
pip install ultralytics
For alternative installation methods including Conda, Docker, and Git, please refer to the Quickstart Guide.
Usage
CLI
YOLOv8 may be used directly in the Command Line Interface (CLI) with a yolo
command:
yolo predict model=YOLOv8m_Iran_license_plate_detection.pt source='your_image.jpg'
yolo
can be used for a variety of tasks and modes and accepts additional arguments, i.e. imgsz=640
. See the YOLOv8 CLI Docs for examples.
Python
YOLOv8 may also be used directly in a Python environment, and accepts the same arguments as in the CLI example above:
from ultralytics import YOLO
# Load a model
model = YOLO("YOLOv8m_Iran_license_plate_detection.pt")
# Train the model
train_results = model.train(
data="Iran_license_plate.yaml", # path to dataset YAML
epochs=100, # number of training epochs
imgsz=640, # training image size
device="cpu", # device to run on, i.e. device=0 or device=0,1,2,3 or device=cpu
)
# Evaluate model performance on the validation set
metrics = model.val()
# Perform object detection on an image
results = model("path/to/image.jpg")
results[0].show()
# Export the model to ONNX format
path = model.export(format="onnx") # return path to exported model
See YOLOv8 Python Docs for more examples.