All models

UNetFormer

A ResNet18 encoder with a global-local Transformer decoder for fast segmentation of urban remote sensing images.

Segmentation · 299 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (26 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
11.7M
Operations
299
Framework
PyTorch
Recurrent
No
Published
ISPRS Journal of Photogrammetry and Remote Sensing (arXiv 2021)
Cited by
1,374 (as of 28 October 2026)
Authors
Libo Wang, Rui Li, Ce Zhang and others
License
GPL-3.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21140
Graph hash
5c7150f428f47d646e4dbf1be7b6800dea0bc5e47118671b5937eb9ed7af4547
Skeleton hash
fda367f2f33b1890cf59465f232a4bb369e858365671dc66aa84b35acd105324
Architecture hash
efdd47c28c6c858c2e5c61cdf54eb77d64f6f4e19d0b6eb1373b03297d7ce417
Diagram SHA-256
3b42870966e72f0348eef7abd404dfb78f948de1478299db63d1f5b5c6f1d16d
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

UNetFormer is a UNet-like network for real-time semantic segmentation of remotely sensed urban scenes. It is a hybrid of two kinds of network, a CNN-based encoder and a Transformer-based decoder. The paper's starting point is that convolution extracts local patterns but lacks the ability to model global context.

The encoder is a pre-trained ResNet18, chosen to extract multi-scale features at low computational cost. The decoder is built from three global-local Transformer blocks and a feature refinement head. Each block's attention has two parallel branches. The local branch uses two parallel convolutional layers with kernel sizes of 3 and 1, and the global branch uses window-based multi-head self-attention. Because attention inside separate windows lacks interactions across windows, the paper adds a cross-shaped window context interaction module to capture cross-window relations. Encoder features join the decoder features through a weighted sum operation.

The feature refinement head strengthens the fused feature along a channel path and a spatial path before the final segmentation map is produced. The paper reports 67.8% mIoU on the UAVid dataset and 52.4% on LoveDA, with inference speed up to 322.4 FPS.

Key idea. The paper pairs a lightweight ResNet18 encoder with a Transformer-based decoder whose global-local attention models both global and local information for real-time urban scene segmentation.

  • unetformer
  • unet-like transformer
  • geoseg
  • remote sensing segmentation
  • urban scene segmentation
  • semantic segmentation
  • global-local attention
  • resnet18 encoder
  • real-time segmentation

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wang2022unetformerunetliketransformerefficient,
      title={UNetFormer: A UNet-like Transformer for Efficient Semantic Segmentation of Remote Sensing Urban Scene Imagery}, 
      author={Libo Wang and Rui Li and Ce Zhang and Shenghui Fang and Chenxi Duan and Xiaoliang Meng and Peter M. Atkinson},
      year={2022},
      eprint={2109.08937},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      doi={https://doi.org/10.1016/j.isprsjprs.2022.06.008},
      url={https://arxiv.org/abs/2109.08937}, 
}