Remote Sensing Image Road Segmentation Method Integrating CNN-Transformer and UNet

Rui Wang, Mingxiang Cai, Zixuan Xia, Zhicui ZhouIEEE Access 2023

Abstract

Extracting road networks from remote sensing imagery is a critical yet challenging task due to the narrow, elongated nature of roads and frequent occlusions from shadows or vegetation. This paper proposes an enhanced UNet architecture that synergizes the local feature extraction capabilities of Convolutional Neural Networks (CNNs) with the global context awareness of Transformers. By incorporating a novel dual upsampling module and a hybrid loss function, the model achieves superior segmentation continuity and accuracy, significantly outperforming existing benchmarks like DeepLabV3 and TransUNet.

Introduction: The "Thin Object" Challenge

Road extraction from satellite and aerial imagery is a classic "thin object" problem in computer vision. Roads are characterized by their high aspect ratios and are often obscured by tree canopies, building shadows, or varying lighting conditions.

Traditional CNNs excel at capturing local textures but often struggle with global connectivity. Because they focus on local pixel neighborhoods, they frequently produce fragmented or "broken" road segments when a road spans an entire image. Conversely, pure Transformer-based models are adept at capturing global context but can produce blurry results regarding fine edge details. This research aims to bridge this gap, creating a model that is both locally precise and globally aware.

Methodology

The authors propose an enhanced version of the UNet architecture, introducing several key innovations to improve road segmentation performance.

The proposed CNN-Transformer hybrid architecture integrates ResNet-50 features with a Transformer encoder to capture both local and global dependencies.

1. CNN-Transformer Hybrid Encoder

The model utilizes a CNN (specifically ResNet-50) to extract high-resolution spatial features. These features are then processed through a Transformer layer (10 iterations), allowing the model to understand both the immediate texture of the road surface and the long-distance geometric relationships across the highway network.

2. Dual Up-sample Module

Standard upsampling techniques in decoders often introduce "checkerboard artifacts"—unnatural patterns in the output. To mitigate this, the authors replaced standard decoder blocks with a dual-channel module.

The Dual Up-sample module combines Pixel Shuffle and Bilinear Interpolation to produce smoother, high-resolution outputs without checkerboard artifacts.

This module combines Pixel Shuffle for high-resolution reconstitution and Bilinear Interpolation for smoothness. This hybrid approach ensures that the final segmentation map is both sharp and continuous.

3. Hard-Swish Activation and Hybrid Loss

Instead of the standard ReLU function, the model employs the Hard-Swish activation function. Hard-Swish is smoother and helps prevent "gradient vanishing," a common issue in deep networks that can stall learning.

Furthermore, the authors implemented a Hybrid Loss Function combining Cross Entropy (CE) loss and Dice Loss. While CE loss provides stability for pixel classification, Dice Loss is specifically designed to handle class imbalance—a frequent issue in road segmentation where roads occupy only a small fraction of the total image pixels.

Experimental Setup and Datasets

The model was rigorously evaluated on two gold-standard benchmarks:

  • Massachusetts Road Dataset: Comprising 1,171 aerial images at 1m resolution.
  • Ottawa Road Dataset: A higher-resolution dataset (0.2m) covering diverse urban, suburban, and rural environments.

To enhance robustness, the authors utilized data augmentation, expanding the datasets by rotating images at 90, 180, and 270-degree intervals.

Key Results and Insights

The proposed model consistently outperformed established architectures across all primary metrics:

  • Ottawa Dataset: Achieved a Mean Pixel Accuracy (MPA) of 95.48% and a Mean Intersection over Union (MIoU) of 90.94%, representing a ~3.5% improvement in MIoU over TransUNet.
  • Massachusetts Dataset: Reached an MPA of 92.56% and an MIoU of 84.97%.

Qualitative analysis confirms that while competing models produced fragmented road segments under tree cover, the proposed architecture maintained continuous, smooth lines. This connectivity is vital for practical applications like navigation map updates.

Conclusion and Future Work

While the model achieves unprecedented accuracy, its primary limitation is computational complexity. The integration of Transformers results in a "heavyweight" model requiring significant GPU resources (e.g., NVIDIA RTX 3080Ti).

Future research will focus on "lightweighting" the architecture. The goal is to optimize the model for deployment on mobile or embedded devices, such as the onboard computers of autonomous vehicles or drones, without sacrificing the high precision achieved in this study.

Summary updated

BibTeX
@article{wang2023remote,
  author = {Rui Wang and Mingxiang Cai and Zixuan Xia and Zhicui Zhou},
  title = {{Remote Sensing Image Road Segmentation Method Integrating CNN-Transformer and UNet}},
  journal = {IEEE Access},
  year = {2023},
  doi = {10.1109/access.2023.3344797},
}
Figure