Export Ultralytics YOLO11 models to the NCNN model format to run efficient, low-latency AI inferences on edge devices with limited power and computing resources.

Export Ultralytics YOLO11 models to the NCNN model format to run efficient, low-latency AI inferences on edge devices with limited power and computing resources.
AI solutions are becoming more common, even in high-stakes sectors like disaster management, waste management, and firefighting. As adoption continues to grow, AI models are being deployed in more diverse environments - not just on servers or in the cloud but directly on devices operating in the field.
For example, drones and equipment with edge components that are powered by small processors can play a crucial role in disaster zones. Equipped with thermal cameras, these devices can collect and analyze data on-site to locate people trapped under rubble. This is made possible through computer vision, a branch of artificial intelligence that interprets visual information from images and video.
However, deploying Vision AI models on edge devices isn’t as straightforward as it might seem. AI models need to be optimized to run efficiently on hardware with limited computing power and memory. That’s why AI frameworks like NCNN are essential. They help convert and optimize models for real-time performance on low-power devices without sacrificing accuracy.
In particular, Ultralytics YOLO models like Ultralytics YOLO11 can be easily exported to NCNN model format using the NCNN integration supported by Ultralytics. Converting YOLO11 to NCNN model format enables the model to run faster, use less memory, and work smoothly across different devices without losing accuracy.
In this article, we’ll explore the NCNN integration supported by Ultralytics and walk through how you can export your YOLO11 model to NCNN model format. Let’s get started!
NCNN is an open-source neural network inference framework developed by Tencent. It was specifically designed for mobile and edge environments, powering high-performance inference with a minimal footprint. This makes it ideal for deployment on resource-constrained devices such as smartphones, drones, and IoT (Internet of Things) devices.
The NCNN framework has gained popularity in the AI and deep learning community due to its efficiency, portability, and optimization for mobile CPUs (Central Processing Units). It enables developers to run neural network models on affordable devices with limited memory and processing power. Designed to be simple and flexible, NCNN supports a wide range of computer vision models and runs across multiple platforms, including Android, Linux, iOS, and macOS.
Here are some of the key features that make NCNN an impactful and widely used neural network inference framework:
Now that we've discussed what NCNN is, let's take a closer look at how to export YOLO11 models to the NCNN format.
Before exporting the model, the first step is to install the Ultralytics Python package using the package installer, pip. This can be done by running "pip install ultralytics" in your terminal or command prompt. If you're working in a Jupyter Notebook or Google Colab, add an exclamation mark before the command, like this: "!pip install ultralytics".
The Ultralytics package provides tools to train, test, fine-tune, and export Vision AI models for a variety of computer vision tasks. If you run into any issues during installation or while exporting a model, the official Ultralytics documentation and Common Issues guide are great resources for troubleshooting.
After installing the Ultralytics package, you can load your YOLO11 model and export it to NCNN format. The example below uses a pre-trained model ("yolo11n.pt") and exports it in NCNN format, saving the output in a folder named "/yolo11n_ncnn_model".
from ultralytics import YOLO
model = YOLO("yolo11n.pt")
model.export(format="ncnn")
The exported YOLO11 model can then be deployed on various lightweight devices such as smartphones, embedded systems, or IoT platforms. The deployment process is also very streamlined.
For instance, consider the code snippet below, which shows how to load the exported model and run inference. Inferencing refers to the process of using a trained model to make predictions on new, unseen data. In this example, the model is tested on an image of a man riding a bicycle, fetched from a publicly available URL.
ncnn_model = YOLO("./yolo11n_ncnn_model")
results = ncnn_model("https://images.pexels.com/photos/19431209/pexels-photo-19431209/free-photo-of-a-man-riding-a-bike-on-a-road.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2.jpg", save=True)
After you run the code, you’ll find the output image in the "runs/detect/predict" folder.
As you explore the various integrations that Ultralytics supports, you might notice that there are several export options available. So, when should you choose the NCNN format?
The NCNN export format is a reliable choice when you need to deploy YOLO11 models on devices with limited resources. It’s especially useful for real-time applications that run directly on the device, like edge devices, without needing a connection to the cloud. This means the model can handle tasks such as object detection right on the spot.
Here are some common scenarios where NCNN is a great fit:
Next, let’s dive into some practical use cases where exporting YOLO11 models to NCNN can make a real difference.
Safety helmets equipped with cameras and embedded micro-computers can be used in fields like construction and firefighting to improve safety and awareness. Real-time Vision AI models, like YOLO11, can be run on these devices to detect various types of objects and equipment. For example, such helmets can help firefighters detect people, obstacles, or hazards in low-visibility conditions.
However, running full-sized models directly on wearable devices can cause slow performance and drain the battery quickly. In this case, using the NCNN integration is a smart choice. It enables low-latency, energy-efficient inference.
Similarly, smart waste bins can be integrated with cameras and compact edge AI processors to identify and sort materials as they are discarded. Vision AI models like YOLO11 can be custom-trained to detect different types of waste materials like paper, plastic, rubber, etc.
Once the waste is identified, it can be automatically sorted into separate compartments based on its reusability. By using edge AI along with exported YOLO11 models in NCNN format, these bins can process data locally - without needing an internet connection. This allows them to operate autonomously and make real-time sorting decisions with minimal delay.
Sometimes, agricultural areas in remote locations lack access to stable internet connections or even consistent power, which limits their ability to run AI applications online. In such cases, edge devices and drones can be used to handle a variety of tasks.
A good example is monitoring livestock such as cattle, sheep, and poultry. This can be done using Vision AI models like YOLO11, which can be used to track animal movement, detect signs of injury, illness, or abnormal behavior, and alert farmers when animals go missing. The NCNN integration also makes it possible to run and process this data directly on edge devices, making it a great fit for image and video analysis on farms in remote or off-grid areas.
Exporting YOLO11 models using the NCNN integration supported by Ultralytics is a straightforward way to bring Vision AI to low-power environments. Whether it's drones in disaster zones, smart waste-sorting bins, or livestock monitoring on remote farms, YOLO and NCNN enable real-time AI inferences that are fast, efficient, and portable. This approach helps make AI systems more accessible and dependable when it matters most.
Want to learn more about AI? Explore our GitHub repository, connect with our community, and check out our licensing options to jumpstart your computer vision project. Find out how innovations like AI in retail and computer vision in healthcare are shaping the future on our solutions pages.