您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

导出模型以用于移动设备Export your model for use with mobile devices

自定义影像服务支持导出分类器以脱机运行。Custom Vision Service allows classifiers to be exported 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:

  • 用于 Android 的 Tensorflow________。Tensorflow for Android.
  • 用于 iOS11 的 CoreML________。CoreML for iOS11.
  • 用于 Windows ML 的 ONNX________。ONNX for Windows ML.
  • 视觉 AI 开发人员工具包Vision AI Developer Kit.
  • 适用于 Windows、Linux 或 ARM 体系结构的 Docker 容器A Docker container for Windows, Linux, or ARM architecture. 容器包含 Tensorflow 模型和服务代码,可使用自定义视觉 API。The container includes a Tensorflow model and service code to use the Custom Vision API.

重要

自定义影像服务仅导出压缩域____。Custom Vision Service only exports 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 may be slightly less accurate than a standard domain with the same amount of training data.

有关如何改进分类器的信息,请参阅改进分类器文档。For information on improving your classifiers, see the Improving your classifier document.

转换为压缩域Convert to a compact domain

备注

本部分中的步骤仅适用于是否有未设置为 compact 域的现有模型。The steps in this section only apply if you have an existing model that is not set to compact domain.

若要转换现有模型的域,请执行以下步骤:To convert the domain of an existing model, take the following steps:

  1. 自定义视觉网站上,选择 " 主页 " 图标以查看项目的列表。On the Custom vision website, select the Home icon to view a list of your projects.

    “主页”图标和项目列表的图像

  2. 选择一个项目,然后选择页面右上角的齿轮图标____。Select a project, and then select the Gear icon in the upper right of the page.

    齿轮图标的图像

  3. 在 " " 部分中,选择一个 压缩 域。In the Domains section, select one of the compact domains. 选择“保存更改”来保存更改____。Select Save Changes to save the changes.

    备注

    对于视觉 AI 开发工具包,必须创建具有__常规 (Compact) __域的项目,并且必须在 "导出功能" 部分下指定 "视觉 AI 开发工具包" 选项。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.

    域选项的图像

  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.

    导出图标的图像

    提示

    如果“导出”项不可用,则表示所选迭代未使用压缩域____。If the Export entry is not available, then the selected iteration does not 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.

后续步骤Next steps

通过浏览以下文章或示例之一将导出的模型集成到应用程序中:Integrate your exported model into an application by exploring one of the following articles or samples: