Export your model for use with mobile devices

Azure AI Custom Vision Service lets you export your classifiers to run offline. You can embed your exported classifier into an application and run it locally on a device for real-time classification.

Export options

Custom Vision Service supports the following exports:

  • TensorFlow for Android
  • TensorFlow.js for JavaScript frameworks like React, Angular, and Vue. This runs on both Android and iOS devices
  • CoreML for iOS 11 and later
  • ONNX for Windows ML, Android, and iOS
  • Vision AI Developer Kit
  • A Docker container for Windows, Linux, or ARM architecture. The container includes a TensorFlow model and service code to use the Custom Vision API

Important

Custom Vision Service only exports projects with compact domains. The models generated by compact domains are optimized for the constraints of real-time classification on mobile devices. Classifiers built with a compact domain might be slightly less accurate than a standard domain with the same amount of training data.

For information on improving your classifiers, see Improving your classifier.

Convert to a compact domain

Note

The steps in this section only apply if you have an existing model that isn't set to compact domain.

To convert the domain of an existing model, follow these steps:

  1. Go to the Custom Vision website, then sign in to view a list of your projects.

    Screenshot that shows a list of projects.

  2. Select a project, and then select the Gear icon in the upper right of the page.

    Screenshot that shows the gear icon.

  3. In the Domains section, select one of the compact domains. Select Save Changes to save the changes.

    Note

    For Vision AI Dev Kit, the project must be created with the General (Compact) domain, and you must specify the Vision AI Dev Kit option under the Export Capabilities section.

    Screenshot that shows the Domains selection.

  4. From the top of the page, select Train to retrain using the new domain.

Export your model

To export the model after retraining, use the following steps:

  1. Go to the Performance tab and select Export.

    Screenshot that shows the export icon.

    Tip

    If the Export entry isn't available, then the selected iteration doesn't use a compact domain. Use the Iterations section of this page to select an iteration that uses a compact domain, and then select Export.

  2. Select your desired export format, and then select Export to download the model.

To integrate your exported model into an application, explore one of the following articles or samples: