Model Exports
Exporting models for deployment to personal or edge devices
In Model Playground, you have the option of exporting the best model from an experiment. To do so, you need to navigate to the "deploy and export" page inside your split, as shown:
In the export section, you can choose which experiment you would like to export the model from, and in what format.

Model export formats

TorchScript

Currently all model families support TorchScript exports. This format can be run on CPU, GPU, and some can also be run on Android or iOS devices (depending on the model you choose). To read up on TorchScript, we recommend looking at the official documentation provided by Pytorch:

Additional export options:

  • Optimize for mobile - Allows users to optimize the model for execution on a mobile device.
  • Save for lite interpreter - Allows users to save for PyTorch lite interpreter for mobile devices.

ONNX

ONNX is the open neural network exchange format. It allows for transferring models between frameworks, tools, runtimes, and compilers. For more information, please see:

Additional export options:

  • ONNX Opset - which opset number to use when exporting. Currently 11 and 12 are supported.

OpenVINO

The OpenVINO format can be used to optimize model performance on many types of hardware including edge devices. To find out more, see:

Additional export options:

  • Enable linear operation fusing - Whether or not to enable fusing of linear operations
  • Enable grouped convolution fusing - Whether or not to enable fusing of grouped convolutions
More export formats will be coming in the future as model playground matures

Exported model files:

Once you export the model and download the export file, you will need to unzip it. Unzipping it will leave you with a folder which contains the following files:
  1. 1.
    'model.*' - The model file will depend on the export format, e.g.' model.pt' for TorchScript or 'model.onnx' for ONNX.
  2. 2.
    'config.yaml' - A summary of your experiment settings - including the transforms you used.
  3. 3.
    'class_mapping.json' - A json file that maps the class integers predicted by the model to the class names that were present in your project.
  4. 4.
    'transforms.json' - A json file that contains the serialized transforms used for testing/validating.
These 4 files provide all the info needed to correctly use/deploy the model on edge. We have provided some sample inference scripts for you to get started in Python. You can find these on the next pages.