|
--- |
|
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 |
|
|
|
--- |
|
|
|
|
|
[Ultralytics](https://www.ultralytics.com/) [YOLOv8](https://github.com/ultralytics/ultralytics) is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks. |
|
|
|
I fine tuned this model on [this dataset](https://www.kaggle.com/datasets/samyarr/iranvehicleplatedataset) for detecting Iranian veichle license plate. |
|
|
|
|
|
## <div align="center">Documentation</div> |
|
|
|
See below for a quickstart installation and usage example, and see the [YOLOv8 Docs](https://docs.ultralytics.com/) for full documentation on training, validation, prediction and deployment. |
|
|
|
<details open> |
|
<summary>Install</summary> |
|
|
|
Pip install the ultralytics package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). |
|
|
|
[![PyPI - Version](https://img.shields.io/pypi/v/ultralytics?logo=pypi&logoColor=white)](https://pypi.org/project/ultralytics/) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ultralytics?logo=python&logoColor=gold)](https://pypi.org/project/ultralytics/) |
|
|
|
```bash |
|
pip install ultralytics |
|
``` |
|
|
|
For alternative installation methods including [Conda](https://anaconda.org/conda-forge/ultralytics), [Docker](https://hub.docker.com/r/ultralytics/ultralytics), and Git, please refer to the [Quickstart Guide](https://docs.ultralytics.com/quickstart/). |
|
|
|
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/ultralytics?logo=condaforge)](https://anaconda.org/conda-forge/ultralytics) [![Docker Image Version](https://img.shields.io/docker/v/ultralytics/ultralytics?sort=semver&logo=docker)](https://hub.docker.com/r/ultralytics/ultralytics) |
|
|
|
</details> |
|
|
|
<details open> |
|
<summary>Usage</summary> |
|
|
|
### CLI |
|
|
|
YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` command: |
|
|
|
```bash |
|
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](https://docs.ultralytics.com/usage/cli/) for examples. |
|
|
|
### Python |
|
|
|
YOLOv8 may also be used directly in a Python environment, and accepts the same [arguments](https://docs.ultralytics.com/usage/cfg/) as in the CLI example above: |
|
|
|
```python |
|
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](https://docs.ultralytics.com/usage/python/) for more examples. |
|
|
|
</details> |