This topic provides guidance on pixel segmentation and on choosing ROI types and drawing ROIs as part of the labeling process for ENVI Deep Learning.

Pixel Segmentation


  • Avoid masking out unwanted features such as clouds or water pixels in your input images. Raster masks are not supported in ENVI Deep Learning as they can lead to invalid classification results.
  • Labeling features and training mask-based models can be a challenging processes. Although you can usually get good results from labeling only a few features and accepting the default training parameters, you will get much more accurate results by investing some time in these steps. Once you build a good model to find specific features, you do not have to retrain it. You can build it once and use it multiple times to classify different images (as long as they have similar spectral and spatial properties).
  • If you are unsure how to set training parameters, you can use the ENVI Modeler to try many random combinations. See Randomize Training Parameters for details.
  • If you get a class activation raster that is completely black, it is possible that the model could not accurately reproduce the training data. Or maybe the training did converge but to an incorrect solution. If this happens, rerun the training step to see if it produces a valid result. Also try increasing the Max values for Class Weight and/or Blur Distance.

Feature Labeling


  • Choose point or polyline ROIs if you want to count and locate features, as opposed to defining their boundaries and shapes (referred to as segmentation). Points and polylines are easier and faster to draw than polygons, and they are the best option for labeling features that have similar sizes and shapes. Points can be used to identify individual features such as cars or trees. Polylines can be used to identify linear features such as roads or rivers. With points and polylines, you can "grow" the size of the feature to reflect its real-world size using the Solid Distance parameter later in training.
  • Polygon ROIs are the best option for labeling features that have irregular sizes and shapes. Use polygons when you want to define the boundaries and shapes of features. However, drawing polygons can take much longer than using points or polylines.
  • For point ROIs, click in the Image window to add points within the centers of objects. Then right-click and select Accept Points. The following image shows an example of point ROIs drawn over residential driveways:

  • For polylines or polygons, click in the Image window to add line segments. To complete each polyline after drawing it, select Complete and Accept Polyline. To complete each polygon after drawing it, select Complete and Accept Polygon. The following images show some examples:

  • Draw ROIs on every instance of a feature in your training rasters. Try to include a variety of shapes, colors, and textures of the feature you are interested in. This will contribute to better accuracy in the final classification.
  • In some cases, you may want to create a label raster that consists entirely of background pixels with no feature pixels. To do this, right-click on the input raster in the Layer Manager and select New Region of Interest. In the Region of Interest (ROI) Tool, accept the default ROI Name of ROI #1. This creates an empty ROI. Then select the ROI in the Input ROI field of the Build Label Raster from ROI tool.