train_model {AzureVision} | R Documentation |
Create, retrieve, rename and delete a model iteration
Description
Create, retrieve, rename and delete a model iteration
Usage
train_model(project, training_method = c("quick", "advanced"),
max_time = 1, force = FALSE, email = NULL, wait = (training_method ==
"quick"))
list_models(project, as = c("ids", "list"))
get_model(project, iteration = NULL)
rename_model(model, name, ...)
delete_model(object, ...)
## S3 method for class 'customvision_project'
delete_model(object, iteration = NULL, confirm = TRUE, ...)
## S3 method for class 'customvision_model'
delete_model(object, confirm = TRUE, ...)
Arguments
project |
A Custom Vision project. |
training_method |
The training method to use. The default "quick" is faster but may be less accurate. The "advanced" method is slower but produces better results. |
max_time |
For advanced training, the maximum training time in hours. |
force |
For advanced training, whether to refit the model even if the data has not changed since the last iteration. |
email |
For advanced training, an email address to notify when the training is complete. |
wait |
whether to wait until training is complete (or the maximum training time has elapsed) before returning. |
as |
For |
iteration |
For |
model |
A Custom Vision model. |
name |
For |
... |
Arguments passed to lower-level functions. |
object |
For the |
confirm |
For the |
Details
Training a Custom Vision model results in a model iteration. Each iteration is based on the current set of images uploaded to the endpoint. Successive model iterations trained on different image sets do not overwrite previous ones.
You must have at least 5 images per tag for a classification project, and 15 images per tag for an object detection project, before you can train a model.
By default, AzureVision will use the latest model iteration for actions such as prediction, showing performance statistics, and so on. You can list the model iterations with list_models
, and retrieve a specific iteration by passing the iteration ID to get_model
.
Value
For train_model
, get_model
and rename_model
, an object of class customvision_model
which is a handle to the iteration.
For list_models
, based on the as
argument: as="ids"
returns a named vector of model iteration IDs, while as="list"
returns a list of model objects.
See Also
show_model
, show_training_performance
, publish_model
Examples
## Not run:
endp <- customvision_training_endpoint(url="endpoint_url", key="key")
myproj <- get_project(endp, "myproject")
train_model(myproj)
train_model(myproj, method="advanced", force=TRUE, email="me@example.com")
list_models(myproj)
mod <- get_model(myproj)
rename(mod, "mymodel")
mod <- get_model(myproj, "mymodel")
delete_model(mod)
## End(Not run)