Ultralytics YOLO11 to MNN: export and PyTorch comparison

Learn to export YOLO11 Nano to MNN and compare Python inference with PyTorch, including the limits of the MacBook CPU performance test.

Player not loading? Watch on YouTube

This tutorial explains how to export Ultralytics YOLO11 to MNN for mobile and edge inference. The example uses YOLO11 Nano, though the speaker says viewers can also export their own trained models. It covers installing Ultralytics and MNN, exporting through the CLI, and running a Python comparison against the original PyTorch model. The export passes through ONNX before producing the MNN file.

The Python walkthrough uses OpenCV video capture, with webcam source zero as the default and a 1920 by 1080 capture size. It measures inference time, calculates average performance, and draws bounding boxes and labels. The speaker also discusses batch size, FP16 and INT8 export options, and points to Python and C++ inference examples in the documentation.

The performance claims need context. The speaker describes an early comparison as nearly twice as fast with similar detections. The supplied description states that the MNN model actually runs 3 to 4 FPS slower in the video's CPU-only MacBook test, while claiming roughly twice the performance on mobile and embedded devices. Those figures do not establish a general speed advantage. For on-device deployment, the useful takeaway is to benchmark the exported model on the intended hardware; the walkthrough itself runs on a MacBook CPU.