ON THIS PAGE

  • Exporting
  • Overview
  • Export Format
  • CLI
  • NN Archive
  • CLI
  • Python API

Exporting

Overview

Export your trained models to formats suitable for deployment on edge devices.

Export Format

  • ONNX: Open Neural Network Exchange format.
To configure the exporter, you can specify the exporter section in the config file:
Yaml
1exporter:
2  onnx:
3    opset_version: 11

CLI

Use the following command to export your model:
Command Line
1luxonis_train export --config configs/example_export.yaml --weights path/to/weights.ckpt

NN Archive

Create an NN Archive file for easy deployment with the DepthAI API. The archive contains the exported model together with all the metadata needed for running the model seamlessly.

CLI

To create an NN Archive using the CLI, use the following command:
Command Line
1luxonis_train archive                         \
2  --config configs/detection_light_model.yaml \
3  --weights path/to/checkpoint.ckpt

Python API

You can also create an NN Archive using the Python API:
Python
1from luxonis_train import LuxonisModel
2
3model = LuxonisModel("configs/detection_light_model.yaml")
4model.archive(weights="path/to/checkpoint.ckpt")