Updated on 2024-04-01 GMT+08:00

Labeling Data

Before data labeling, consider how to design labels. The labels must correspond to the distinct characteristics of the detected images and are easy to identify (the detected object in an image is highly distinguished from the background). Each label specifies the expected recognition result of the detected images. After the label design is complete, prepare images based on the designed labels. It is recommended that the number of all images to be detected be greater than 100. If the labels of some images are similar, prepare more images. At least two classes of samples are required for training, and each class with at least 50 samples.

  • During labeling, the variance of a class should be as small as possible. That is, the labeled objects of the same class should be as similar as possible. The labeled objects of different classes should be as different as possible.
  • The contrast between the labeled objects and the image background should be as stark as possible.
  • In object detection labeling, a target object must be entirely contained within a labeling box. If there are multiple objects in an image, do not relabel or miss any objects.

After a project is created, you will be redirected to the new-version ExeML and the project starts to run. When the data labeling phase changes to Awaiting operation, manually confirm data labeling in the dataset. You can also add or delete data in the dataset and modify labels.

Figure 1 Data labeling status

Labeling Images

  1. On the labeling phase of the new-version ExeML, click Instance Details. The data labeling page is displayed. Click an image to go to the labeling page.

  2. Left-click and drag the mouse to select the area where the target object is located. In the dialog box that is displayed, select the label color, enter the label name, for example, yunbao, and press Enter. After the labeling is complete, the status of the images changes to Labeled.
    More descriptions of data labeling are as follows:
    • You can click the arrow keys in the upper and lower parts of the image, or press the left and right arrow keys on the keyboard to select another image. Then, repeat the preceding operations to label the image. If an image contains more than one object, you can label all the objects.
    • You can add multiple labels with different colors for an object detection ExeML project for easy identification. After selecting an object, select a new color and enter a new label name in the dialog box that is displayed to add a new label.
    • In an ExeML project, object detection supports only rectangular labeling boxes. In the Data Management function, more types of labeling boxes are supported for object detection datasets.
    • In the Label Data window, you can scroll the mouse to zoom in or zoom out on the image to quickly locate the object.
    Figure 2 Image labeling for object detection

    For an object detection dataset, you can add multiple labeling boxes and labels to an image during labeling. The labeling boxes cannot extend beyond the image boundary.

  3. After all images in the image directory are labeled, return to the ExeML workflow page and click Next. The workflow automatically publishes a data labeling version and performs training.

Synchronizing or Adding Images

In the labeling phase, click Instance Details to go to the data labeling page. Then, add images from your local PC or synchronize images from OBS.

Figure 3 Adding local images
Figure 4 Synchronizing images from OBS
  • Add data: You can quickly add images on a local PC to ModelArts. These images will be automatically synchronized to the OBS path specified during project creation. Click Add data and import data.
  • Synchronize New Data: You can upload images to the OBS directory specified during project creation and click Synchronize New Data to quickly add the new images in the OBS directory to ModelArts.
  • Delete: You can delete images one by one, or select Select Images on Current Page to delete all images on the page.

    Deleted images cannot be recovered.

Modifying Labeled Data

After labeling data, you can modify the labeled data on the Labeled tab page.

  • Modifying based on images

    On the dataset details page, click the Labeled tab, and then select the image to be modified. Modify the image information in the label information area on the right.

    • Modifying a label: In the Labeling area, click the editing icon, enter the correct label name in the text box, and click the check mark to complete the modification. The label color cannot be modified.
    • Deleting a label: In the Labeling area, click the deletion button to delete a label for the image.

      After the label is deleted, click the project name in the upper left corner of the page to exit the labeling page. The image will be returned to the Unlabeled tab page.

      Figure 5 Editing an object detection label
  • Modifying based on labels

    On the labeling job overview page, click Label Management on the right. You will see the label management page, which shows information about all labels.

    Figure 6 Label management page
    • Modifying a label: Click Modify in the Operation column. In the dialog box that appears, enter a new label and click OK. After the modification, the images that have been added with the label use the new label name.
    • Deleting a label: Click the deletion button in the Operation column. In the dialog box that appears, confirm the operation and click OK.

      Deleted tags cannot be restored.

Resuming Workflow Execution

After confirming data labeling, return back to the new-version ExeML. Click Next. Then, the workflow continues to run in sequence until all phases are executed.

Figure 7 Resuming the workflow execution