在标记项目中标记图像(预览)Tag images in a labeling project (preview)

项目管理员在 Azure 机器学习中创建标记项目后,你可以使用标记工具(公共预览版)为机器学习项目快速准备数据。After your project administrator creates a labeling project in Azure Machine Learning, you can use the labeling tool (public preview) to rapidly prepare data for a Machine Learning project. 本文介绍:This article describes:

  • 如何访问标签项目How to access your labeling projects
  • 标记工具The labeling tools
  • 如何使用工具执行特定的标签任务How to use the tools for specific labeling tasks

先决条件Prerequisites

  • 或组织和项目的 Microsoft 帐户或 Azure Active Directory 帐户A Microsoft account or an Azure Active Directory account for the organization and project
  • 对包含标签项目的工作区具有参与者级别访问权限。Contributor level access to the workspace that contains the labeling project.

登录到工作区Sign in to the workspace

  1. 登录到 Azure 机器学习工作室Sign in to Azure Machine Learning studio.

  2. 选择包含标签项目的订阅和工作区。Select the subscription and the workspace that contains the labeling project. 从项目管理员处获取此信息。Get this information from your project administrator.

  3. 选择左侧的“数据标记”来查找项目。Select Data labeling on the left-hand side to find the project.

了解标记任务Understand the labeling task

在数据标签项目的表中,为项目选择“标签链接”。In the table of data labeling projects, select Label link for your project.

你会看到特定于项目的说明。You see instructions that are specific to your project. 其中解释了现有的数据类型、如何做出决策以及其他相关信息。They explain the type of data that you're facing, how you should make your decisions, and other relevant information. 阅读此信息后,在页面顶部选择“任务”。After you read this information, at the top of the page select Tasks. 或者在页面底部选择“开始标记”。Or at the bottom of the page, select Start labeling.

标签任务的常用功能Common features of the labeling task

在所有图像标记任务中,需从项目管理员指定的集内选择适当的标记。In all image-labeling tasks, you choose an appropriate tag or tags from a set that's specified by the project administrator. 可以使用键盘上的数字键选择前九个标记。You can select the first nine tags by using the number keys on your keyboard.

在图像分类任务中,可以同时选择查看多个图像。In image-classification tasks, you can choose to view multiple images simultaneously. 使用图像区域上方的图标选择布局。Use the icons above the image area to select the layout.

若要同时选择所有显示的图像,请使用“全选”。To select all the displayed images simultaneously, use Select all. 若要选择单个图像,请使用图像右上角的循环选择按钮。To select individual images, use the circular selection button in the upper-right corner of the image. 必须至少选择一个图像才能应用标记。You must select at least one image to apply a tag. 如果选择多个图像,选择的任何标记将应用到所有选定的图像。If you select multiple images, any tag that you select will be applied to all the selected images.

此处我们选择了 2x2 布局,并将“哺乳动物”标记应用到熊和虎鲸的。Here we've chosen a two-by-two layout and are about to apply the tag "Mammal" to the images of the bear and orca. 鲨鱼图像标记为“软骨鱼”;尚未对鬣蜥进行标记。The image of the shark was already tagged as "Cartilaginous fish," and the iguana hasn't been tagged yet.

多个图像布局和选择

重要

仅当有包含未标记数据的新页面时,才可以切换布局。Only switch layouts when you have a fresh page of unlabeled data. 切换布局会清除页面的正在进行的标记工作。Switching layouts clears the page's in-progress tagging work.

当你在页面上标记所有图像时,Azure 会启用“提交”按钮。Azure enables the Submit button when you've tagged all the images on the page. 选择“提交”以保存工作。Select Submit to save your work.

提交手头数据的标记后,Azure 将使用工作队列中的一组新图像刷新页面。After you submit tags for the data at hand, Azure refreshes the page with a new set of images from the work queue.

辅助机器学习(预览版)Assisted machine learning (preview)

重要

辅助机器学习目前提供公共预览版。Assisted machine learning is currently in public preview. 该预览版在提供时没有附带服务级别协议,建议不要将其用于生产工作负载。The preview version is provided without a service level agreement, and it's not recommended for production workloads. 某些功能可能不受支持或者受限。Certain features might not be supported or might have constrained capabilities.

可能会触发机器学习算法。Machine learning algorithms may be triggered. 如果在项目中启用了这些算法,你可能会看到以下内容:If these algorithms are enabled in your project, you may see the following:

  • 在标记了一定数量的图像后,你可能会在屏幕顶部的项目名称旁边看到“群集任务”。After some amount of images have been labeled, you may see Tasks clustered at the top of your screen next to the project name. 这意味着这些图像被分组到一起,在同一页面上呈现相似的图像。This means that images are grouped together to present similar images on the same page. 如果是这样,请切换到多个图像视图中的一个来利用分组。If so, switch to one of the multiple image views to take advantage of the grouping.

  • 稍后,你可能会在项目名称旁边看到“预标记任务”。At a later point, you may see Tasks prelabeled next to the project name. 然后,图像将显示一个来自机器学习分类模型的建议标签。Images will then appear with a suggested label that comes from a machine learning classification model. 任何机器学习模型都达不到 100% 的准确度。No machine learning model has 100% accuracy. 虽然我们只使用模型有信心识别的图像,但这些图像仍然可能没有正确地预标记。While we only use images for which the model is confident, these images might still be incorrectly prelabeled. 看到这些标签时,请在提交页面之前更正任何错误的标签。When you see these labels, correct any wrong labels before submitting the page.

  • 对于对象检测模型,你可能会看到已存在的边界框和标签。For object detection models, you may see bounding boxes and labels already present. 在提交页面之前更正不正确的任何内容。Correct any that are incorrect before submitting the page.

特别是在标记项目的早期阶段,机器学习模型可能只能准确地预标记一小部分图像。Especially early in a labeling project, the machine learning model may only be accurate enough to prelabel a small subset of images. 在标记这些图像后,标记项目将返回到手动标记,为下一轮模型训练收集更多数据。Once these images are labeled, the labeling project will return to manual labeling to gather more data for the next round of model training. 随着时间的推移,模型将对更高比例的图像更有信心,从而在项目的后期产生更多的预标记任务。Over time, the model will become more confident about a higher proportion of images, resulting in more prelabel tasks later in the project.

标记图像以进行多类分类Tag images for multi-class classification

如果项目的类型为“图像分类多类”,则会将单一标记分配给整个图像。If your project is of type "Image Classification Multi-Class," you'll assign a single tag to the entire image. 若要随时查看指导,请转到“说明”页,然后选择“查看详细说明”。To review the directions at any time, go to the Instructions page and select View detailed instructions.

如果在向图像分配标记后发现有误,可以修复标记。If you realize that you made a mistake after you assign a tag to an image, you can fix it. 选择图像下面显示的标签上的“X”可以清除标记。Select the "X" on the label that's displayed below the image to clear the tag. 或者选择该图像,然后选择另一个类。Or, select the image and choose another class. 新选择的值将替换以前应用的标记。The newly selected value will replace the previously applied tag.

标记图像以进行多标签分类Tag images for multi-label classification

如果正在处理类型为“多标签图像分类”的项目,则会将一个或多个标记应用到图像。If you're working on a project of type "Image Classification Multi-Label," you'll apply one or more tags to an image. 若要查看特定于项目的指导,请选择“说明”并转到“查看详细说明”。To see the project-specific directions, select Instructions and go to View detailed instructions.

选择要标记的图像,然后选择标记。Select the image that you want to label and then select the tag. 该标记将应用到所有选定的图像,然后会取消选择这些图像。The tag is applied to all the selected images, and then the images are deselected. 若要应用多个标记,必须重新选择图像。To apply more tags, you must reselect the images. 以下动画演示了多标签标记:The following animation shows multi-label tagging:

  1. “全选”用于应用“海洋”标记。Select all is used to apply the "Ocean" tag.
  2. 选择单个图像并将其标记为“特写”。A single image is selected and tagged "Closeup."
  3. 选择了三个图像,并将其标记为“广角”。Three images are selected and tagged "Wide angle."

演示多标签流的动画

若要更正错误,可以单击“X”以清除单个标记,或选择图像后选择标记,从所有选定图像中清除该标记。To correct a mistake, click the "X" to clear an individual tag or select the images and then select the tag, which clears the tag from all the selected images. 此处演示了上述场景。This scenario is shown here. 单击“陆地”会从两个选定图像中清除该标记。Clicking on "Land" will clear that tag from the two selected images.

显示多个取消选择操作的屏幕截图

仅当将至少一个标记应用于每个图像后,Azure 才会启用“提交”按钮。Azure will only enable the Submit button after you've applied at least one tag to each image. 选择“提交”以保存工作。Select Submit to save your work.

标记图像并指定边界框以进行对象检测Tag images and specify bounding boxes for object detection

如果项目的类型为“对象标识(边界框)”,请在图像中指定一个或多个边界框,并将标记应用到每个框。If your project is of type "Object Identification (Bounding Boxes)," you'll specify one or more bounding boxes in the image and apply a tag to each box. 图像都可以有多个边界框,每个框具有单个标记。Images can have multiple bounding boxes, each with a single tag. 使用“查看详细说明”来确定项目中是否使用了多个边界框。Use View detailed instructions to determine if multiple bounding boxes are used in your project.

  1. 选择要创建的边界框的标记。Select a tag for the bounding box that you plan to create.
  2. 选择“矩形框”工具 矩形框工具 或按“R”。Select the Rectangular box tool Rectangular box tool or select "R."
  3. 在目标中单击并沿对角线拖动以创建大致的边界框。Click and drag diagonally across your target to create a rough bounding box. 若要调整边界框,请拖动边或角。To adjust the bounding box, drag the edges or corners.

演示如何创建基本边界框的屏幕截图。

若要删除边界框,请在创建后单击边界框旁边显示的 X 形目标。To delete a bounding box, click the X-shaped target that appears next to the bounding box after creation.

无法更改现有边界框的标记。You can't change the tag of an existing bounding box. 如果错误地分配了标记,则必须删除边界框,并使用正确的标记创建新的边界框。If you make a tag-assignment mistake, you have to delete the bounding box and create a new one with the correct tag.

默认情况下,可以编辑现有的边界框。By default, you can edit existing bounding boxes. “锁定/解锁区域”工具 锁定/解锁区域工具 或“L”可切换该行为。The Lock/unlock regions tool Lock/unlock regions tool or "L" toggles that behavior. 如果区域已锁定,则只能更改新边界框的形状或位置。If regions are locked, you can only change the shape or location of a new bounding box.

使用“区域操作”工具 区域操作工具 或“M”来调整现有的边界框。Use the Regions manipulation tool Regions manipulation tool or "M" to adjust an existing bounding box. 拖动边或角来调整形状。Drag the edges or corners to adjust the shape. 在内部单击即可拖动整个边界框。Click in the interior to be able to drag the whole bounding box. 如果无法编辑某个区域,则很可能已切换了“锁定/解锁区域”工具。If you can't edit a region, you've probably toggled the Lock/unlock regions tool.

使用“基于模板的框”工具 模板的框工具 或“T”来创建大小相同的多个边界框。Use the Template-based box tool Template-box tool or "T" to create multiple bounding boxes of the same size. 如果图像没有边界框,并且你激活基于模板的框,则该工具将生成 50x50 像素框。If the image has no bounding boxes and you activate template-based boxes, the tool will produce 50-by-50-pixel boxes. 如果创建边界框,然后激活基于模板的框,任何新边界框将采用上次创建的框的大小。If you create a bounding box and then activate template-based boxes, any new bounding boxes will be the size of the last box that you created. 可以在放置后调整基于模板的框的大小。Template-based boxes can be resized after placement. 调整基于模板的框的大小只会调整该特定框的大小。Resizing a template-based box only resizes that particular box.

若要删除当前图像中的所有边界框,请选择“删除所有区域”工具 删除区域工具To delete all bounding boxes in the current image, select the Delete all regions tool Delete regions tool.

创建图像的边界框后,请选择“提交”以保存工作,否则正在进行的工作不会保存。After you create the bounding boxes for an image, select Submit to save your work, or your work in progress won't be saved.

完成Finish up

当你提交已标记数据的页时,Azure 会从工作队列为你分配新的未标记数据。When you submit a page of tagged data, Azure assigns new unlabeled data to you from a work queue. 如果没有其他未标记的数据,你将看到一条消息,其中包含门户主页的链接。If there's no more unlabeled data available, you'll get a message noting this along with a link to the portal home page.

完成标记操作后,请在标记门户的右上角选择自己的姓名,然后选择“注销”。如果未注销,最终 Azure 会“超时”并将数据分配给另一个做标签的人。When you're done labeling, select your name in the upper-right corner of the labeling portal and then select sign-out. If you don't sign out, eventually Azure will "time you out" and assign your data to another labeler.

后续步骤Next steps