Description Usage Arguments Details Value See Also Examples
Publish, export and unpublish a Custom Vision model iteration
1 2 3 4 5 6 7 | publish_model(model, name, prediction_resource)
unpublish_model(model, confirm = TRUE)
export_model(model, format, destfile = basename(httr::parse_url(dl_link)$path))
list_model_exports(model)
|
model |
A Custom Vision model iteration object. |
name |
For |
prediction_resource |
For |
confirm |
For |
format |
For |
destfile |
For |
Publishing a model makes it available to clients as a predictive service. Exporting a model serialises it to a file of the given format in Azure storage, which can then be downloaded. Each iteration of the model can be published or exported separately.
The format
argument to export_model
can be one of the following. Note that exporting a model requires that the project was created with support for it.
"onnx"
: ONNX 1.2
"coreml"
: CoreML, for iOS 11 devices
"tensorflow"
: TensorFlow
"tensorflow lite"
: TensorFlow Lite for Android devices
"linux docker"
, "windows docker"
, "arm docker"
: A Docker image for the given platform (Raspberry Pi 3 in the case of ARM)
"vaidk"
: Vision AI Development Kit
export_model
returns the URL of the exported file, invisibly if it was downloaded.
list_model_exports
returns a data frame detailing the formats the current model has been exported to, along with their download URLs.
train_model
, get_model
, customvision_predictive_service
, predict.classification_service
, predict.object_detection_service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
endp <- customvision_training_endpoint(url="endpoint_url", key="key")
myproj <- get_project(endp, "myproject")
mod <- get_model(myproj)
export_model(mod, "tensorflow", download=FALSE)
export_model(mod, "onnx", destfile="onnx.zip")
rg <- AzureRMR::get_azure_login("yourtenant")$
get_subscription("sub_id")$
get_resource_group("rgname")
pred_res <- rg$get_cognitive_service("mycustvis_prediction")
publish_model(mod, "mypublishedmod", pred_res)
unpublish_model(mod)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.