Skip to main content

Model Conversion

How to accelerate your model on CV25

  1. Train your model using the framework of your choice. Common options are PyTorch or TensorFlow.

  2. Export your model to .onnx. If you plan to use CNNGen version 2.7 or earlier in the next step, it is also possible to export to .tflite. How you export depends on the framework you use. We provide guides for PyTorch and TensorFlow:
    PyTorch-to-onnx
    TensorFlow-to-onnx

  3. The Ambarella CNNGen Toolchain is not publicly available, so you need to contact Ambarella directly to gain access to it. Once you receive the toolchain, please refer to Ambarella's documentation and examples for how to compile the model for CV25, and/or see Axis guides for how to use the toolchain here: onnx-to-cv25

  4. Run the compiled .bin model on your device. Example test run:

    larod-client -g <my-model>.bin -c ambarella-cvflow -i ""

    More info here

Flowchart

DLPU Conversion Schematic