- Home
- Geospatialblog
- Deep Learning Based Road Extraction
Deep Learning Based Road Extraction
Published Date: Jan. 6, 2025, 5:14 a.m. || Abin Prajapti 101 views

With the advancements of science and technology, artificial intelligence is growing rapidly for automation, making the life of people easier and efficient. It has also emerged as a transformative approach in geospatial analysis for feature extraction, prediction, environment monitoring, and disaster management. Leveraging deep learning algorithms analyzes complex patterns to solve intricate problems.
Traditional methods of road extraction consume more time and effort adopting manual digitization. Road network can be extracted easily using deep learning segmentation models in a faster way that can support different applications like urban planning, navigation, disaster management and automated map updating.
This task involves the development of segmentation models for road networks extraction from the high-resolution satellite or drone orthomoisac imagery.
- Methodology:
For the road network extraction using deep learning, the following procedures were adopted.
1.1 Dataset Collection:
DeepGlobe Road Extraction Dataset were used from the freely available datasets from kaggle. This dataset had satellite images and corresponding labeled masks which were used for pretrained model training.
1.2 Data Preprocessing:
Collected datasets were resized to 256 pixels from 1024 pixels. These datasets had jpg and png images in the same folder, which were kept separate for training and masking to facilitate the model training process. Then, the images were augmented to both training and masking images to increase the dataset for training which improves the robustness of the model and to prevent overfitting. Horizontal and vertical flipping, random brightness adjustments were applied to the training datasets. Also, batching and prefetching were done for efficiency and faster computation.
3.3 Model:
Pre-defined segmentation model by qubvel was used for semantic segmentation of the road network. This task being a binary segmentation problem, sigmoid activation function and binary cross entropy loss function was used for segmenting foreground and background in a Unet model with resnet152 backbone. RMSprop optimizer was used to solve the vanishing gradient problems ensuring the network learns efficiently.
Parameters used in the model:
- Model: Unet
- Backbone: resnet152
- Learning Rate (LR): 0.00005
- Optimizer: RMSprop
- Metrics: IoU Score and FScore
- Activation function: sigmoid
- Loss function: binary cross entropy
- Batch size: 32
- Epochs: 50
- Encoder_weights: Imagenet
- Early Stopping: Callbacks & monitor
IoU Score and FScore were used for the evaluation of the metrics.
F Score is a weighted average or harmonic mean of Precision and Recall.
Mathematically, it is defined as:
F Score = 2*Precision*RecallPrecision+Recall
|
(1) |
IoU, also known as the Jaccard index, is the ratio of the intersected area to the combined area of prediction and ground truth.
The formula used to evaluate the performance is given as:
Intersection over Union (IoU) = Area of OverlapArea of Union |
(2) |
2. Output:
After training the model, it was validated with different datasets and different evaluations like IoU and F1 Score were done which were plotted in the graph shown below.
The discrepancies in the observed IoU score for training and validation indicates the overfitting. It may be due to the freely available dataset, optimizer, learning rate, low number of datasets or models, and its backbones. Hypertuning these parameters may improve the IoU score of the model.
Figure: Training F1Score Vs Validation F1 Score
Figure: Training IoU Vs Validation IoU
Figure: Training loss vs Validation loss
The below images are the combination of original image, it corresponding ground truth and prediction done by the Unet with resnet152 backbone.
Fig: Real Image VS Ground Truth Vs Prediction
3. Conclusion:
This task demonstrates the use of Unet model with a resnet152 backbone capable of segmenting the road networks from high resolution satellite images applied for different applications like urban planning, disaster management, and automated map updating.