Update YOLO11 Actions and Docs (#16596)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
51e93d6111
commit
97f38409fb
124 changed files with 1948 additions and 1948 deletions
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
comments: true
|
||||
description: Optimize YOLOv8 models for mobile and embedded devices by exporting to NCNN format. Enhance performance in resource-constrained environments.
|
||||
keywords: Ultralytics, YOLOv8, NCNN, model export, machine learning, deployment, mobile, embedded systems, deep learning, AI models
|
||||
description: Optimize YOLO11 models for mobile and embedded devices by exporting to NCNN format. Enhance performance in resource-constrained environments.
|
||||
keywords: Ultralytics, YOLO11, NCNN, model export, machine learning, deployment, mobile, embedded systems, deep learning, AI models
|
||||
---
|
||||
|
||||
# How to Export to NCNN from YOLOv8 for Smooth Deployment
|
||||
# How to Export to NCNN from YOLO11 for Smooth Deployment
|
||||
|
||||
Deploying [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) models on devices with limited computational power, such as mobile or embedded systems, can be tricky. You need to make sure you use a format optimized for optimal performance. This makes sure that even devices with limited processing power can handle advanced computer vision tasks well.
|
||||
|
||||
The export to NCNN format feature allows you to optimize your [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) models for lightweight device-based applications. In this guide, we'll walk you through how to convert your models to the NCNN format, making it easier for your models to perform well on various mobile and embedded devices.
|
||||
The export to NCNN format feature allows you to optimize your [Ultralytics YOLO11](https://github.com/ultralytics/ultralytics) models for lightweight device-based applications. In this guide, we'll walk you through how to convert your models to the NCNN format, making it easier for your models to perform well on various mobile and embedded devices.
|
||||
|
||||
## Why should you export to NCNN?
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ NCNN models offer a wide range of key features that enable on-device [machine le
|
|||
|
||||
## Deployment Options with NCNN
|
||||
|
||||
Before we look at the code for exporting YOLOv8 models to the NCNN format, let's understand how NCNN models are normally used.
|
||||
Before we look at the code for exporting YOLO11 models to the NCNN format, let's understand how NCNN models are normally used.
|
||||
|
||||
NCNN models, designed for efficiency and performance, are compatible with a variety of deployment platforms:
|
||||
|
||||
|
|
@ -44,9 +44,9 @@ NCNN models, designed for efficiency and performance, are compatible with a vari
|
|||
|
||||
- **Desktop and Server Deployment**: Capable of being deployed in desktop and server environments across Linux, Windows, and macOS, supporting development, training, and evaluation with higher computational capacities.
|
||||
|
||||
## Export to NCNN: Converting Your YOLOv8 Model
|
||||
## Export to NCNN: Converting Your YOLO11 Model
|
||||
|
||||
You can expand model compatibility and deployment flexibility by converting YOLOv8 models to NCNN format.
|
||||
You can expand model compatibility and deployment flexibility by converting YOLO11 models to NCNN format.
|
||||
|
||||
### Installation
|
||||
|
||||
|
|
@ -57,15 +57,15 @@ To install the required packages, run:
|
|||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Install the required package for YOLOv8
|
||||
# Install the required package for YOLO11
|
||||
pip install ultralytics
|
||||
```
|
||||
|
||||
For detailed instructions and best practices related to the installation process, check our [Ultralytics Installation guide](../quickstart.md). While installing the required packages for YOLOv8, if you encounter any difficulties, consult our [Common Issues guide](../guides/yolo-common-issues.md) for solutions and tips.
|
||||
For detailed instructions and best practices related to the installation process, check our [Ultralytics Installation guide](../quickstart.md). While installing the required packages for YOLO11, if you encounter any difficulties, consult our [Common Issues guide](../guides/yolo-common-issues.md) for solutions and tips.
|
||||
|
||||
### Usage
|
||||
|
||||
Before diving into the usage instructions, it's important to note that while all [Ultralytics YOLOv8 models](../models/index.md) are available for exporting, you can ensure that the model you select supports export functionality [here](../modes/export.md).
|
||||
Before diving into the usage instructions, it's important to note that while all [Ultralytics YOLO11 models](../models/index.md) are available for exporting, you can ensure that the model you select supports export functionality [here](../modes/export.md).
|
||||
|
||||
!!! example "Usage"
|
||||
|
||||
|
|
@ -74,14 +74,14 @@ Before diving into the usage instructions, it's important to note that while all
|
|||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Load the YOLOv8 model
|
||||
model = YOLO("yolov8n.pt")
|
||||
# Load the YOLO11 model
|
||||
model = YOLO("yolo11n.pt")
|
||||
|
||||
# Export the model to NCNN format
|
||||
model.export(format="ncnn") # creates '/yolov8n_ncnn_model'
|
||||
model.export(format="ncnn") # creates '/yolo11n_ncnn_model'
|
||||
|
||||
# Load the exported NCNN model
|
||||
ncnn_model = YOLO("./yolov8n_ncnn_model")
|
||||
ncnn_model = YOLO("./yolo11n_ncnn_model")
|
||||
|
||||
# Run inference
|
||||
results = ncnn_model("https://ultralytics.com/images/bus.jpg")
|
||||
|
|
@ -90,18 +90,18 @@ Before diving into the usage instructions, it's important to note that while all
|
|||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Export a YOLOv8n PyTorch model to NCNN format
|
||||
yolo export model=yolov8n.pt format=ncnn # creates '/yolov8n_ncnn_model'
|
||||
# Export a YOLO11n PyTorch model to NCNN format
|
||||
yolo export model=yolo11n.pt format=ncnn # creates '/yolo11n_ncnn_model'
|
||||
|
||||
# Run inference with the exported model
|
||||
yolo predict model='./yolov8n_ncnn_model' source='https://ultralytics.com/images/bus.jpg'
|
||||
yolo predict model='./yolo11n_ncnn_model' source='https://ultralytics.com/images/bus.jpg'
|
||||
```
|
||||
|
||||
For more details about supported export options, visit the [Ultralytics documentation page on deployment options](../guides/model-deployment-options.md).
|
||||
|
||||
## Deploying Exported YOLOv8 NCNN Models
|
||||
## Deploying Exported YOLO11 NCNN Models
|
||||
|
||||
After successfully exporting your Ultralytics YOLOv8 models to NCNN format, you can now deploy them. The primary and recommended first step for running a NCNN model is to utilize the YOLO("./model_ncnn_model") method, as outlined in the previous usage code snippet. However, for in-depth instructions on deploying your NCNN models in various other settings, take a look at the following resources:
|
||||
After successfully exporting your Ultralytics YOLO11 models to NCNN format, you can now deploy them. The primary and recommended first step for running a NCNN model is to utilize the YOLO("./model_ncnn_model") method, as outlined in the previous usage code snippet. However, for in-depth instructions on deploying your NCNN models in various other settings, take a look at the following resources:
|
||||
|
||||
- **[Android](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-android)**: This blog explains how to use NCNN models for performing tasks like [object detection](https://www.ultralytics.com/glossary/object-detection) through Android applications.
|
||||
|
||||
|
|
@ -113,40 +113,40 @@ After successfully exporting your Ultralytics YOLOv8 models to NCNN format, you
|
|||
|
||||
## Summary
|
||||
|
||||
In this guide, we've gone over exporting Ultralytics YOLOv8 models to the NCNN format. This conversion step is crucial for improving the efficiency and speed of YOLOv8 models, making them more effective and suitable for limited-resource computing environments.
|
||||
In this guide, we've gone over exporting Ultralytics YOLO11 models to the NCNN format. This conversion step is crucial for improving the efficiency and speed of YOLO11 models, making them more effective and suitable for limited-resource computing environments.
|
||||
|
||||
For detailed instructions on usage, please refer to the [official NCNN documentation](https://ncnn.readthedocs.io/en/latest/index.html).
|
||||
|
||||
Also, if you're interested in exploring other integration options for Ultralytics YOLOv8, be sure to visit our [integration guide page](index.md) for further insights and information.
|
||||
Also, if you're interested in exploring other integration options for Ultralytics YOLO11, be sure to visit our [integration guide page](index.md) for further insights and information.
|
||||
|
||||
## FAQ
|
||||
|
||||
### How do I export Ultralytics YOLOv8 models to NCNN format?
|
||||
### How do I export Ultralytics YOLO11 models to NCNN format?
|
||||
|
||||
To export your Ultralytics YOLOv8 model to NCNN format, follow these steps:
|
||||
To export your Ultralytics YOLO11 model to NCNN format, follow these steps:
|
||||
|
||||
- **Python**: Use the `export` function from the YOLO class.
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Load the YOLOv8 model
|
||||
model = YOLO("yolov8n.pt")
|
||||
# Load the YOLO11 model
|
||||
model = YOLO("yolo11n.pt")
|
||||
|
||||
# Export to NCNN format
|
||||
model.export(format="ncnn") # creates '/yolov8n_ncnn_model'
|
||||
model.export(format="ncnn") # creates '/yolo11n_ncnn_model'
|
||||
```
|
||||
|
||||
- **CLI**: Use the `yolo` command with the `export` argument.
|
||||
```bash
|
||||
yolo export model=yolov8n.pt format=ncnn # creates '/yolov8n_ncnn_model'
|
||||
yolo export model=yolo11n.pt format=ncnn # creates '/yolo11n_ncnn_model'
|
||||
```
|
||||
|
||||
For detailed export options, check the [Export](../modes/export.md) page in the documentation.
|
||||
|
||||
### What are the advantages of exporting YOLOv8 models to NCNN?
|
||||
### What are the advantages of exporting YOLO11 models to NCNN?
|
||||
|
||||
Exporting your Ultralytics YOLOv8 models to NCNN offers several benefits:
|
||||
Exporting your Ultralytics YOLO11 models to NCNN offers several benefits:
|
||||
|
||||
- **Efficiency**: NCNN models are optimized for mobile and embedded devices, ensuring high performance even with limited computational resources.
|
||||
- **Quantization**: NCNN supports techniques like quantization that improve model speed and reduce memory usage.
|
||||
|
|
@ -174,13 +174,13 @@ NCNN is versatile and supports various platforms:
|
|||
|
||||
If running models on a Raspberry Pi isn't fast enough, converting to the NCNN format could speed things up as detailed in our [Raspberry Pi Guide](../guides/raspberry-pi.md).
|
||||
|
||||
### How can I deploy Ultralytics YOLOv8 NCNN models on Android?
|
||||
### How can I deploy Ultralytics YOLO11 NCNN models on Android?
|
||||
|
||||
To deploy your YOLOv8 models on Android:
|
||||
To deploy your YOLO11 models on Android:
|
||||
|
||||
1. **Build for Android**: Follow the [NCNN Build for Android](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-android) guide.
|
||||
2. **Integrate with Your App**: Use the NCNN Android SDK to integrate the exported model into your application for efficient on-device inference.
|
||||
|
||||
For step-by-step instructions, refer to our guide on [Deploying YOLOv8 NCNN Models](#deploying-exported-yolov8-ncnn-models).
|
||||
For step-by-step instructions, refer to our guide on [Deploying YOLO11 NCNN Models](#deploying-exported-yolo11-ncnn-models).
|
||||
|
||||
For more advanced guides and use cases, visit the [Ultralytics documentation page](../guides/model-deployment-options.md).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue