我是 Microsoft Custom Vision 的新手,我正在使用 jupyter notebooks/python 集成 Microsoft Azure Custom Vision API。我能够上传图像,自动标记它们并训练第一次迭代。但是,当我尝试下载训练迭代/模型的 Docker 文件时,我在尝试导出模型时遇到了困难。使用函数export_iteration我最终得到了一个mst.rest.pipeline.clientrawresponse 对象。我认为目前它只存储在导出队列中。如何访问此队列元素以将其下载到本地系统?
PS:我正在使用通用(紧凑)模型格式,因此它应该是可导出的。
示例代码:
# Initalize the Training Client
training_key = "your-training-key"
ENDPOINT = "your-endpoint"
c_plat = CustomVisionTrainingClient(training_key,ENDPOINT)
# List all projects you have
projects = c_plat.get_projects()
#Always take the newest project and its newest iteration and export it
iterations = c_plat.get_iterations(projects[0].id)
c_plat.export_iteration(project_id=projects[0].id, iteration_id=iterations[0].id, platform = "DockerFile", raw=True, flavor = "ARM")