Create and manage labels

Available with Image Analyst license.

Available with Spatial Analyst license.

Supervised deep learning relies on humans to label data to train neural networks. This labeled data allows the deep learning neural networks to learn and perform tasks such as image classification and object detection. The tools in the Label Objects pane (for deep learning) can be used for labeling tasks.

Designate the source images and open the pane

To designate the source images and open the pane, complete the following steps:

  1. Click the Imagery tab..
  2. Click the Deep Learning Tools drop-down arrow, and click Label Objects for Deep Learning.
  3. From the Label using drop-down box, choose one of the following:
    • Existing image layer—Select an imagery layer from the Imagery layer drop-down box.
    • New image collection layer—Browse to and select a folder containing images.

      To create labels for multiple images in a folder, you can select the entire folder, which creates and adds an image collection layer to the map.

The Label Objects pane appears. You can use the tools in this pane to create and manage labeling schemas and labels, and export training data.

Create a schema

A schema is a structured system that defines the various classes used to label objects (or pixels) for training models.

To create a schema with classes, complete the following steps:

  1. Create a schema by doing the following:
    1. In the Image Classification pane, right-click New Schema and click Edit Properties.

      Edit new schema

    2. Provide a name for the schema.

      Edit schema name

    3. Click the Save button.

      The schema is renamed in the Image Classification pane where you can add classes to it.

  2. Add a class to the schema by doing the following:
    1. Right-click the schema you created, and click Add New Class.

      Add New Class option

    2. Provide a name for the class.

      New class name

    3. Provide a value for the class.

      The value cannot be 0.

    4. Optionally, choose a color for the class.
    5. Click OK.

      The class is added to the schema in the Image Classification pane.

    6. Optionally, repeat steps 2a through 2e to add more classes.

Note:

If you do not want to manually create all the labels as shown in the steps above, use the Browse drop-down arrow to generate a schema from the following options:

  • Browse to existing schema—Generate a new schema from an existing schema.
  • Generate from training samples—Generate a new schema from an existing training sample feature class.
  • Generate from classified raster—Generate a new schema from an existing classified raster dataset.
  • Use default schema—Generate a new schema from the 2011 National Land Cover Database schema.

Label images

You can label images using sketch tools and AI-assisted tools. The subsections below describe the various labeling tools.

Label using sketch tools

To label images using the sketch tools, complete the following steps:

  1. Click one of the sketch tools, such as Rectangle, Polygon, Circle, or Freehand, to begin collecting object samples.

    If you create a feature without a class specified, the Define Class dialog box appears. For more information, see the Define Class section in the Label objects for deep learning topic.

  2. Using a sketch tool, delineate the image feature representing the object on the map.

    If you are creating a feature without a specified class, the Define Class dialog box appears. For more information, see the Define Class section.

  3. Continue to create and label objects as specified in the steps above.
  4. Use the Labeled Objects tab (at the bottom of the pane) to delete and organize the labeled object samples.
  5. Once you are satisfied with the labeled objects, click the Save button on the Labeled Objects tab to save the samples.

Label using the Auto Detect tool

To label images using the Auto Detect tool, complete the following steps:

  1. Click the Auto Detect tool Auto detect to begin collecting object samples.
    Note:

    The deep learning frameworks for ArcGIS must be installed to use this feature.

  2. Zoom in close to the feature.

    The Auto Detect tool requires a significant number of pixels of the feature to be displayed on the map.

  3. Click the object of interest.

    A rectangle bounding box is drawn. For a polygon boundary of the feature, press the Shift key while clicking the feature; this draws a perimeter around the shape of the feature.

  4. Continue to create and label objects as specified in the steps above.
  5. Use the Labeled Objects tab (at the bottom of the pane) to delete and organize the labeled object samples.
  6. Once you are satisfied with the labeled objects, click the Save button on the Labeled Objects tab to save the samples.

Note:
The Auto Detect tool works well on distinct features. It is not recommended for continuous features adjacent to each other.

Label using the Text Prompt tool

To label images using the Text Prompt tool, complete the following steps:

  1. In the Class Name text box, type the name of an object of interest, such as trees or rectangles.
    Note:

    The deep learning frameworks for ArcGIS must be installed to use this feature.

  2. Click the Detect button.

    Bounding boxes are drawn around the resulting objects.

  3. Continue to create and label objects as specified in the steps above.
  4. Use the Labeled Objects tab (at the bottom of the pane) to delete and organize the labeled object samples.
  5. Once you are satisfied with the labeled objects, click the Save button on the Labeled Objects tab to save the samples.

Note:
To improve the results, set the Box threshold and Text threshold values in the Configure options.

Label the entire image

When you don't need to draw boundaries around objects, you can use the Label Image button Label Image to label the entire image with the selected class, regardless of the spatial aspect of the object.

To label an entire image, complete the following steps:

  1. Confirm that you are using the proper image collection or mosaic dataset as the source.
  2. On the Image Collection tab, use the arrows to select the image you want to label.
  3. Select the appropriate class label in the schema.
  4. Click the Label Image button Label Image.

    The selected label is assigned to the entire image.

  5. Continue to create and label objects as specified in the steps above.
  6. Use the Labeled Objects tab (at the bottom of the pane) to delete and organize the labeled object samples.
  7. Once you are satisfied with the labeled objects, click the Save button on the Labeled Objects tab to save the samples.

Label image collections

If you have a collection of images that you want to label one at a time, use a mosaic dataset layer or an image collection layer to label each of the images.

To label a collection of images, complete the following steps:

  1. Click the Deep Learning Tools drop-down arrow, and click Label Objects using Deep Learning.
  2. In the Label using drop-down box, select New image collection layer.
  3. Browse to and select the folder containing images.
  4. Click OK.

    The Image Classification pane appears.

  5. In the Image Classification pane, click the Image Collection tab.
  6. Use the arrow buttons next to the image name to choose the next image to view and label.
  7. Use the sketch tools or the AI-assisted tools to create labels as outlined in the sections above.
  8. Continue to create and label objects as specified in the steps above.
  9. Use the Labeled Objects tab (at the bottom of the pane) to delete and organize the labeled object samples.
  10. Once you are satisfied with the labeled objects, click the Save button on the Labeled Objects tab to save the samples.

Note:
If you don't want images projected to the map space, check the Label in pixel space check box. This causes the image to be drawn so it's easier to interpret.

Manage labels

The Labeled Objects tab, which is where you manage the training samples you collected for each class, is in the lower section of the Image Classification pane . A training sample has location information (polygon), an associated class, and its pixel percentage. To view and manage training samples, select a training sample and do any or all of the following:

  • Zoom in to a label on the map—In the training sample table, double-click the row of the training sample you want to zoom in to.
  • Delete a training sample—Click the Delete button Delete Selected Item(s).
  • Assign the training sample to another class or a new class—Use the Edit Class Properties button Edit Class Properties.
  • Save the labels as a feature class—Use the Save button Save or the Save As button Save Edits.
  • Add existing labels—Use the Load Training Samples button Browse.

Export training data

You can export collected samples to training data using the Export Training Data tab.

If you have existing training samples in a raster dataset or a feature class, you can alternatively use the Export Training Data For Deep Learning tool to train a deep learning model task.

To export training data using the Export Training Data tab, complete the following steps:

  1. In the Image Classification pane, click the Export Training Data tab and do the following:
    1. Provide the Output Folder value.

      This is the path and name of the folder where the output image chips and metadata will be stored.

    2. Optionally, provide the Mask Polygon value.

      This is a polygon feature class that delineates the area where image chips can be created. Only image chips that are completely within the polygon will be created.

    3. Optionally, choose the Image Format value for the chips.

      Supported formats are TIFF, PNG, JPEG, and MRF.

    4. Optionally, specify Tile Size X and Tile Size Y values.

      These are the x dimension and y dimension of the image chips. The default values typically produce good results. Generally the same size is specified for both dimensions.

    5. Optionally, specify Stride X and Stride Y values.

      This is the distance to move in the x direction and y direction when creating the next image chip. When stride is equal to tile size, there is no overlap. When stride is equal to half the tile size, there is 50 percent overlap.

    6. Optionally, specify the Rotation Angle value.

      The image chip is rotated at the specified angle to create additional image chips. An additional image chip is created for every angle until the image chip has fully rotated. For example, if you specify a rotation angle of 45 degrees, eight image chips are created. These image chips are created for the following angles: 45, 90, 135, 180, 225, 270, and 315 degrees.

    7. Optionally, choose the Reference System value.

      This is the reference system that will be used to interpret the input image. The options are Map Space or Pixel Space. Map space uses a map-based coordinate system, which is the default when the input raster has a spatial reference defined. Pixel space uses an image space coordinate system, which has no rotation or distortion. The Pixel Space option is recommended when the input imagery is oriented or oblique. The specified reference system must match the reference system used to train the deep learning model.

    8. Optionally, check the Output No Feature Tiles check box.

      When this option is checked, all image chips are exported, including those that do not capture training samples. When this option is left unchecked, only image chips that capture training samples are exported. The default is unchecked.

    9. Optionally, choose the Meta Data Format value.

      The metadata formats supported for object detection are Labeled Tiles, Pascal Visual Object Classes, and RCNN Masks.

    10. Click Run to export the training data.

The exported training data can now be used in a deep learning model.

For additional information about labeling images and training data, see the following ArcGIS Blog articles:

Related topics