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:
Go to the Custom Vision website, then sign in to view a list of your projects.
Select a project, and then select the Gear icon in the upper right of the page.
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.
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:
Go to the Performance tab and select Export.
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.
Select your desired export format, and then select Export to download the model.
Related content
To integrate your exported model into an application, explore one of the following articles or samples:
- Run a TensorFlow model in Python
- Use your ONNX model with Windows Machine Learning
- See the Swift sample for CoreML model in an iOS application
- See the Android sample for TensorFlow model in an Android app
- See the Xamarin iOS sample for CoreML model with Xamarin