Annotation

Annotation provides mainstreaming annotation tools and well integrated to MLSteam.

Setup Label Studio

Label Studio is a data annotation tool, available in MLSteam. To setup Label Studio:

  1. Create a project-scoped folder as image source.

    We use yolo-sample as an example here.

  2. In Annotation page, create a new annotation
    ../_images/create_annotation.png
  3. Create a Label Studio environment

    • Annotation environment: select Label Studio

    • Folders: yolo-sample

    ../_images/add_label_studio.png
  4. Enter Label Studio.

    ../_images/launch_label_studio.png
  5. Click on the Create Project button.

  6. In the dialog, fill in the following fields, and click on the Save button:

    • Project name tab:

      • Project name: the project name

      • Description: a brief description (optional)

      ../_images/setup_labelstudio_4.png
    • Labeling setup tab:

      • Select Object Detection with Bounding Boxes.

      • Define the labels.

      ../_images/setup_labelstudio_5.png ../_images/setup_labelstudio_6.png
  7. In the project page, click on the Settings button.

    ../_images/setup_labelstudio_7.png
  8. In the Cloud Storage section, click on the Add Source Storage button.

    ../_images/setup_labelstudio_8.png
  9. In the dialog, fill in the following fields, and click on the Add Storage button.

    • Storage type: Local files

    • Storage title: a storage title (optional)

    • Absolute path: path to the images to label (for the yolo-sample dataset, this would be /data/yolo-sample/training_data/yolo/images)

    • File filter regex: image file filter in regular expressions (optional) (for the yolo-sample dataset, this would be .*jpg)

    • Treat every bucket object as a source file: enabled

    ../_images/setup_labelstudio_9.png

    Note

    1. The root of storage path could be copied from the folder sidebar.

      ../_images/setup_labelstudio_9b.png
    2. You may click on the Check Connection button to test the existence of storage path.

  10. Back to the project settings page, click on the Sync Storage button.

    ../_images/setup_labelstudio_10.png
  11. Back to the project main page by clicking on the top navbar.

    ../_images/setup_labelstudio_11.png
  12. Select an image to label, add the bounding boxes for the corresponding classes, and click on the Submit button.

    ../_images/setup_labelstudio_12.png ../_images/setup_labelstudio_13.png
  13. Repeat the previous step until all the images are labelled.

Export Label Studio Annotations to an Attached Folder

  1. Make sure the destination MLSteam folder has been attached to Label Studio and has an output directory (E.g., output).

    ../_images/setup_labelstudio_1.png
  2. Go to the project settings page, click on the Add Target Storage button.

    ../_images/setup_labelstudio_14.png
  3. In the dialog, fill in the following fields, and click on the Add Storage button.

    • Storage type: Local files

    • Storage title: a storage title (optional)

    • Absolute local path: the output path created in the mounted project-scoped folder (For example, /data/yolo-sample/output)

    ../_images/setup_labelstudio_15.png
  4. Back to the project settings page, click on the Sync Storage button.

    ../_images/setup_labelstudio_16.png
  5. Back to the folder page, the labelling data will be saved in the output directory.

    ../_images/setup_labelstudio_17.png

Export Label Studio Annotations to any Project Folder

  1. Make sure the destination MLSteam folder has been created in the project and has an output directory.

  2. Click on the Export Annotation item in the top menu.

    ../_images/export_labelstudio_annotation_1.png
  3. In the dialog, fill in the following fields, and then click on the Select button.

    • Source: the Label Studio view to export.

      Note

      Label Studio uses views (a tab within a project) to filter the annotation tasks. In this example, the project name is New Project #1 and the tab name is Default.

    • Format: the export format.

    ../_images/export_labelstudio_annotation_2.png
  4. Select the output folder and directory, and then click on the OK button.

    ../_images/export_labelstudio_annotation_3.png
  5. Click on the Export button to start annotation export.

    ../_images/export_labelstudio_annotation_4.png
  6. Wait for a while, and the exported file will be saved in the output folder.

    ../_images/export_labelstudio_annotation_5.png

Setup CVAT

CVAT is a data annotation tool, available in MLSteam. To setup CVAT:

  1. Create a project-scoped folder as image source.

    We use yolo-sample as an example here.

  2. In Annotation page, create a new annotation.
    ../_images/create_annotation.png
  3. Create a CVAT environment.

    • Annotation environment: select CVAT

    • Folders: yolo-sample

    ../_images/add_cvat.png
  4. Enter CVAT.

  5. Click on the Create new task button.

  6. Fill the task creation form fields.

    • To create annotation tasks from an attached project folder, click on Connected file share, expand directory tree, and sellect the needed files.

    ../_images/setup_cvat_4.png

    Warning

    Don’t include .cvat directory. It will result in error.

  7. Open the task after submit.

    ../_images/setup_cvat_5.png
  8. Open the job.

    ../_images/setup_cvat_6.png
  9. Do the labeling (labeling process is not covered here).

Export CVAT Annotations to any Project Folder

  1. Make sure the destination MLSteam folder has been created in the project and has an output directory.

  2. Click on the Export Annotation item in the top menu.

    ../_images/export_cvat_annotation_1.png
  3. In the dialog, fill in the following fields, and then click on the Select button.

    • Source: the CVAT task to export.

    • Format: the export format.

    ../_images/export_cvat_annotation_2.png
  4. Select the output folder and directory, and then click on the OK button.

    ../_images/export_cvat_annotation_3.png
  5. Click on the Export button to start annotation export.

    ../_images/export_cvat_annotation_4.png
  6. Wait for a while, and the exported file will be saved in the output folder.

    ../_images/export_cvat_annotation_5.png