Skip To Content

Use the model

You can use this model in the Classify Pixels Using Deep Learning tool available in the Image Analyst toolbox in ArcGIS Pro. The complete workflow involves postprocessing steps using additional tools.

A simplified workflow is also available with a custom tool packaged as an ArcGIS Pro project template. The sections below describe the steps to use the model with this tool.

  1. Download the Extract Roads ArcGIS Pro project template to use the pretrained model, or a fine-tuned model as needed.
  2. Start ArcGIS Pro and from the project selection screen, choose the Select another project template option.
    Select another project template option in ArcGIS Pro
  3. Browse to the downloaded template (Extract_Roads.aptx) and click OK.
    Extract Roads ArcGIS Pro project template
  4. Provide a name for your new project and click OK.
    Provide a name for your project.
  5. Ensure you have added three-band satellite imagery (30–50 centimeter spatial resolution) from which you want to extract roads in ArcGIS Pro, and zoom in to an area of interest.
    Added three-band RGB imagery
  6. Browse to <Project_name>.tbx under Toolboxes in the Catalog pane to access the Extract Roads tool.
    Extract Roads tool
  7. Set the variables under the Parameters tab as follows:
    The selection of these parameters will vary with different use cases of this tool. Refer to the Use cases of the Extract Roads tool section below for details.

    1. Input Imagery (optional, if Classified Raster or Road Features layer is not provided)—Select the three-band RGB imagery from which roads will be extracted.
    2. Classified Raster or Road Features (optional, if Input Imagery is not provided)—Load the classified raster or select a road feature layer as input for postprocessing (to be used after inferencing).
    3. Output Road Feature Class—Set the output feature class that will contain the extracted roads.
    4. Model Definition (optional)—Select the pretrained or fine-tuned model .dlpk file.

      If not selected, the model is automatically downloaded from ArcGIS Living Atlas of the World.

    5. Model Arguments (optional)—Change the values of the arguments if required.
      • batch_size—Number of image tiles processed in each step of the model inference. This depends on the memory of your graphic card.
      • tile_size—The width and height of image tiles into which the imagery is split for prediction.
      • padding—Number of pixels at the border of image tiles from which predictions are blended for adjacent tiles. Increase its value to smooth the output while reducing edge artifacts. The maximum value of the padding can be half of the tile size.
      • threshold—The predictions above this confidence score are included in the result. The allowed value ranges from 0 to 1.0.
      • test_time_augmentation—Performs test time augmentation while predicting. If true, predictions of flipped and rotated variants of the input image will be merged into the final output.
      • merge_policy—Policy for merging augmented predictions. Available options are mean, max, or min. This is only applicable when test time augmentation is used.
    6. Save Classified Raster (optional)—Save a classified raster with two classes: roads and other.
    7. Processor Type—Select CPU or GPU.

      It is recommended that you select GPU, if available, and set GPU ID to the GPU to be used.

    8. Cell Size (required if Input Imagery is provided)—Change if required.

      The expected spatial resolution is 30–50 centimeters.

    9. Postprocessing Options (optional)—Change the values as required to generate optimal results for different areas.
      • Buffer Distance—The distance to create a buffer around input features.
      • Extend Length—The maximum distance a road line segment can be extended to an intersecting feature.
      • Smoothing Tolerance—The value for smoothing the road line segments.
      • Dangle Length—Road line segments that are shorter than this length and do not touch another line at both endpoints (dangles) will be trimmed.
      Extract Roads tool with parameters
  8. Click Run.

    The output layer (and, optionally, the classified raster) is added to the map.

Use cases of the Extract Roads tool

You can use this tool to extract road features and classified raster from an input imagery. You can further use it to postprocess the obtained classified raster or the extracted road features to improve the results. Following are the use cases and the corresponding steps to use the tool:

  1. Use Extract Roads with RGB satellite imagery.
    1. Select RGB satellite imagery in the Input Imagery parameter.

      Set the other parameters as required.

      Extract Roads tool parameters and environments
    2. Click Run.

      The output layer is added to the map.

      Output feature class with roads detected as lines
  2. Use Extract Roads with a classified raster.

    To improve the results of the classified raster output, apply postprocessing over it with a different set of parameters to create a well-connected road network.

    1. Provide the classified raster as input in the Classified Raster or Road Features parameter.

      Change the Postprocessing Options parameters as required to generate optimal results. Notice that all the parameters required for model inferencing are automatically hidden at this point. Only postprocessing parameters are available.

      Extract Roads tool parameters
    2. Click Run.

      The output layer is added to the map.

  3. Postprocess previously extracted road features.

    After running the tool, a few roads may be disconnected or have artifacts due to tree canopy shadows or other reasons, as shown in the image below. The results can be improved by running the postprocessing steps again on the extracted road features.

    Output road features
    1. Select the feature layer with the extracted roads in the Classified Raster or Road Features parameter.

      Set the other parameters as required.

      Extract Roads tool parameters
    2. Click Run.

      The output layer is added to the map.

      Postprocessed road features
      Note:

      You can run the postprocessing as many times as needed to improve the results.