add_image_tags {AzureVision} | R Documentation |
Tag and untag images uploaded to a project
Description
Tag and untag images uploaded to a project
Usage
add_image_tags(project, image_ids, tags)
## S3 method for class 'classification_project'
add_image_tags(project, image_ids = list_images(project, "untagged"), tags)
remove_image_tags(project, image_ids = list_images(project, "tagged", as =
"ids"), tags = list_tags(project, as = "ids"))
Arguments
project |
a Custom Vision classification project. |
image_ids |
The IDs of the images to tag or untag. |
tags |
For |
Details
add_image_tags
is for tagging images that were uploaded previously, while remove_image_tags
untags them. Adding tags does not remove previously assigned ones. Similarly, removing one tag from an image leaves any other tags intact.
Tags can be specified in the following ways:
For a regular classification project (one tag per image), as a vector of strings. The tags will be applied to the images in order. If the length of the vector is 1, it will be recycled to the length of
image_ids
.For a multilabel classification project (multiple tags per image), as a list of vectors of strings. Each vector in the list contains the tags to be assigned to the corresponding image. If the length of the list is 1, it will be recycled to the length of
image_ids
.
If the length of the vector is 1, it will be recycled to the length of image_ids
.
Value
The vector of IDs for the images affected, invisibly.
See Also
add_image_regions
for object detection projects
Examples
## Not run:
imgs <- dir("path/to/images", full.names=TRUE)
img_ids <- add_images(myproj, imgs)
add_image_tags(myproj, "mytag")
remove_image_tags(myproj, img_ids[1])
add_image_tags(myproj, img_ids[1], "myothertag")
## End(Not run)