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.
- Download the Extract Roads ArcGIS Pro project template to use the pretrained model, or a fine-tuned model as needed.
- Start ArcGIS Pro and from the project selection screen, choose the
Select another project template option.
- Browse to the downloaded template (Extract_Roads.aptx) and click OK.
- Provide a name for your new project and click OK.
- 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.
- Browse to <Project_name>.tbx under Toolboxes in the Catalog pane to access the
Extract Roads tool.
- 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.
- 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.
- 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).
- Output Road Feature Class—Set the output feature class that will contain the extracted roads.
- 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.
- 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.
- Save Classified Raster (optional)—Save a classified raster with two classes: roads and other.
- 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.
- Cell Size (required if Input Imagery is provided)—Change if required.
The expected spatial resolution is 30–50 centimeters.
- 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.
- 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:
- Use Extract Roads with RGB satellite imagery.
- Select RGB satellite imagery in the Input Imagery parameter.
Set the other parameters as required.
- Click Run.
The output layer is added to the map.
- Select RGB satellite imagery in the Input Imagery parameter.
- 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.
- 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.
- Click Run.
The output layer is added to the map.
- Provide the classified raster as input in the Classified Raster or Road
Features parameter.
- 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.
- Select the feature layer with the extracted roads in the Classified
Raster or Road Features parameter.
Set the other parameters as required.
- Click Run.
The output layer is added to the map.
Note:
You can run the postprocessing as many times as needed to improve the results.
- Select the feature layer with the extracted roads in the Classified
Raster or Road Features parameter.