This example demonstrates how to perform inference of YOLO26 family detection models in C++ leveraging the Executorch backends:
To install ExecuTorch, follow this guide.
NOTE: Please install the OpenVINO nightly version that supports the YOLO26 model.
python -m pip install --pre openvino==2026.1.0.dev20260131 --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightlyThe demo requires the ultralytics package, which depends on torch and torchvision. Since these packages are already installed as dev dependencies, use --upgrade-strategy only-if-needed to avoid version conflicts:
python -m pip install --upgrade-strategy only-if-needed --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txtOpenVINO:
python export_and_validate.py --model_name yolo26s --input_dims=[1920,1080] --backend openvino --device CPUOpenVINO quantized model:
python export_and_validate.py --model_name yolo26s --input_dims=[1920,1080] --backend openvino --quantize --video_path /path/to/calibration/video --device CPUXNNPACK:
python export_and_validate.py --model_name yolo26s --input_dims=[1920,1080] --backend xnnpackExported model could be validated using the --validate key:
python export_and_validate.py --model_name yolo26s --backend ... --validate dataset_name.yamlA list of available datasets and instructions on how to use a custom dataset can be found here.
Validation only supports the default --input_dims; please do not specify this parameter when using the --validate flag.
To get a full parameters description please use the following command:
python export_and_validate.py --helpOpenVINO:
cd examples/models/yolo26
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_OPENVINO_BACKEND=ON ..
make -j$(nproc)XNNPACK:
cd examples/models/yolo26
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_XNNPACK_BACKEND=ON ..
make -j$(nproc)./build/Yolo26DetectionDemo -model_path /path/to/exported/model -input_path /path/to/video/file -output_path /path/to/output/annotated/videoTo get a full parameters description please use the following command:
./build/Yolo26DetectionDemo --helpUltralytics examples: https://github.com/ultralytics/ultralytics/tree/main/examples