Upload a Model to the Registry

The ML model service works with models trained inside and outside the Viam app. To use a model that you have trained yourself outside the Viam app, upload it as a new model privately or share it in the Viam registry. If you need to update a previously uploaded model, you can also upload a new version.

If you have trained or uploaded an ML model privately and now want to make it available for reuse, you can at any point make the existing model public in the registry.

Also, share a model from your organization with other users in the registry.

Model framework support

Before uploading your model to the cloud, check and see if you will be able to deploy it to your machine. Model framework support is currently as follows:

Model FrameworkML Model ServiceHardware SupportSystem ArchitectureDescription
TensorFlow Litetflite_cpuAny CPU
Nvidia GPU
Linux, Raspbian, MacOS, AndroidQuantized version of TensorFlow that has reduced compatibility for models but supports more hardware. Uploaded models must adhere to the model requirements.
ONNXonnx_cpuAny CPU
Nvidia GPU
Android, MacOS, Linux arm-64Universal format that is not optimized for hardware inference but runs on a wide variety of machines.
TensorFlowtritonNvidia GPULinux (Jetson)A full framework that is made for more production-ready systems.
PyTorchtritonNvidia GPULinux (Jetson)A full framework that was built primarily for research. Because of this, it is much faster to do iterative development with (model doesn’t have to be predefined) but it is not as “production ready” as TensorFlow. It is the most common framework for OSS models because it is the go-to framework for ML researchers.

Upload a new model or new version

On the DATA tab in the Viam app, navigate to the MODELS subtab. Click Upload model.

Upload model menu on the DATA tab of the Viam app.

Select if you want to upload a New model or a New version of a previously published model.

Select Public to upload the model publicly to the Viam registry. This makes the model usable by any external organization. See ML models in the registry for more information.

Select Private to only publish the model for internal use within this organization. Select Next steps to continue.

Upload model menu on the DATA tab of the Viam app.
  1. Select the Model framework or the type of model. TensorFlow Lite, TensorFlow, PyTorch, and ONNX model frameworks are currently supported.
  2. Upload the files required for your model framework:
    • For a TensorFlow Lite or ONNX model framework, upload a .txt label file containing the label names you provided in training, with one name per line.
    • For a TensorFlow model framework, upload the model in the SavedModel format.
  3. Specify a name for the model.
  4. Specify the Task type.
  5. Add a short description. This will help other users to understand how to use your model.

Select Upload model. The model is now visible on the MODELS subtab of the DATA tab in the Viam app and available to deploy on your machine. Also, if you selected Public, it should be publicly visible in the Viam registry.

Select from your existing models.
  1. Select the model you would like to update from your existing models.
  2. Click Next steps to continue.
  3. Select the Model framework or the type of model. TensorFlow Lite, TensorFlow, PyTorch, and ONNX model frameworks are currently supported.
  4. Upload the files required for your model framework:
    • For a TensorFlow Lite or ONNX model framework, upload a .txt label file containing the label names you provided in training, with one name per line.
    • For a TensorFlow model framework, upload the model in the SavedModel format.
  5. Click Upload model.

Your model is now updated.

Make an existing model public in the registry

To add a model that you’ve trained to the Viam registry so that other users can deploy it onto their robots:

  1. On the DATA tab in the Viam app, navigate to the MODELS subtab. You’ll see a list of all ML models you have access to.
  2. Open the menu on the right side of an ML model’s row.
List of models displayed on MODELS subtab of DATA tab.
  1. Then, click Make public in Registry.
Publish model to registry action card.
  1. Add a short description. This will help other users to understand how to use your model.
  2. Then, click Publish model. Your model is now publicly visible in the Viam registry.

Next steps

Have questions, or want to meet other people working on robots? Join our Community Discord.

If you notice any issues with the documentation, feel free to file an issue or edit this file.