๐Ÿ”ฅ News

January 13, 2026 ยท View on GitHub

cap

๐Ÿ”ฅ News

  • 2026/1/13: CenterSeg has been accepted by TGRS2026!
  • 2025/7/3: TinyViM has been accepted by ICCV 2025! It is an efficient and powerful backbone, and performs well on remote sensing image segmentation tasks. We have included the code of TinyViM in the rssegmentation repository.
  • 2025/3/18: We add TSNE map and the link of preprocessed dataset and checkpoints.
  • 2025/3/14: We fix some bugs and add CAM and Throughput.
  • 2025/2/11: LOGCAN++ has been accepted by TGRS2025!
  • 2025/1/24: SCSM has been accepted by ISPRS2025!
  • 2024/10/11: SSA-Seg has been accepted by NeurIPS2024! It is an effective and powerful classifier for semantic segmentation. We recommend interested researchers to optimize it for semantic segmentation in remote sensing, which is a promising direction.

๐Ÿ“ท Introduction

rssegmentation is an open-source semantic segmentation toolbox, which is dedicated to reproducing and developing advanced methods for semantic segmentation of remote sensing images.

Overview
Methods Datasets Tools
  • Training
  • Testing
  • Params, FLOPs, Latency, Throughput
  • Class activation map
  • TSNE map

๐Ÿ† Checkpoint

ModelVaihingen
Preprocessed
Potsdam
Preprocessed
LoveDAiSAID
LoG-Can83.086.4--
SACANet83.786.8--
DOCNet84.087.1--
LOGCAN++83.987.7--
SCSM----

The backbone is provided at this link. The password for all links is xwma

Note: The above results are obtained on the A5000 GPU, which are affected by device and random seeds. For example, we have an average higher mIoU on the V100 GPU. The remaining checkpoints will be updated gradually.

๐Ÿ“’ Folder Structure

Prepare the following folders to organize this repo:
rssegmentation
โ”œโ”€โ”€ rsseg (core code for datasets and models)
โ”œโ”€โ”€ tools (some useful tools)
โ”œโ”€โ”€ work_dirs (save the model weights and training logs)
โ”œโ”€โ”€ data
โ”‚   โ”œโ”€โ”€ LoveDA
โ”‚   โ”‚   โ”œโ”€โ”€ Train
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Urban
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ images_png (original images)
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ masks_png (original labels)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Rural
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ images_png (original images)
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ masks_png (original labels)
โ”‚   โ”‚   โ”œโ”€โ”€ Val (the same with Train)
โ”‚   โ”‚   โ”œโ”€โ”€ Test
โ”‚   โ”œโ”€โ”€ vaihingen
โ”‚   โ”‚   โ”œโ”€โ”€ ISPRS_semantic_labeling_Vaihingen 
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ top (original images)
โ”‚   โ”‚   โ”œโ”€โ”€ ISPRS_semantic_labeling_Vaihingen_ground_truth_COMPLETE (original labels)
โ”‚   โ”‚   โ”œโ”€โ”€ ISPRS_semantic_labeling_Vaihingen_ground_truth_eroded_COMPLETE (original noBoundary lables)
โ”‚   โ”‚   โ”œโ”€โ”€ train (processed)
โ”‚   โ”‚   โ”œโ”€โ”€ test (processed)
โ”‚   โ”œโ”€โ”€ potsdam (the same with vaihingen)
โ”‚   โ”‚   โ”œโ”€โ”€ 2_Ortho_RGB (original images)
โ”‚   โ”‚   โ”œโ”€โ”€ 5_Labels_all (original labels)
โ”‚   โ”‚   โ”œโ”€โ”€ 5_Labels_all_noBoundary (original noBoundary lables)
โ”‚   โ”‚   โ”œโ”€โ”€ train (processed)
โ”‚   โ”‚   โ”œโ”€โ”€ test (processed)

๐Ÿ” Preparation

  • Environment
conda create -n rsseg python=3.9
conda activate rsseg
conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.7 -c pytorch -c nvidia
pip install -r requirements.txt
  • Data Preprocess
# Modify img-dir and mask-dir if necessary
bash tools/vaihingen_preprocess.sh 
bash tools/potsdam_preprocess.sh 

Note: We also provide the preprocessed vaihingen and potsdam dataset.

๐Ÿ“š Use example

1๏ธโƒฃ Training

python train.py -c configs/vaihingen/logcanplus.py

2๏ธโƒฃ Testing

  • Vaihingen and Potsdam
python test.py \
-c configs/vaihingen/logcanplus.py \
--ckpt work_dirs/logcanplus_vaihingen/epoch=45.ckpt \
  • LoveDA

Note that since the loveda dataset needs to be evaluated online, we provide the corresponding test commands.

python online_test.py \
-c configs/loveda/logcanplus.py \
--ckpt work_dirs/logcanplus_loveda/epoch=45.ckpt \

3๏ธโƒฃ Useful tools

  • Param and FLOPs
python tools/flops_params_count.py -c configs/vaihingen/logcanplus.py 
  • Latency
python tools/latency_count.py \
-c configs/vaihingen/logcanplus.py \
--ckpt work_dirs/logcanplus_vaihingen/epoch=45.ckpt \
  • Throughput
  python tools/throughput_count.py -c configs/vaihingen/logcanplus.py
  • Class activation map
python tools/cam.py \
-c configs/vaihingen/logcanplus.py \
--ckpt work_dirs/logcanplus_vaihingen/epoch=45.ckpt \
--tar_layer "model.net.seghead.catconv2[-2]" \
--tar_category 1
  • TSNE map
  python tools/tsne.py \
  -c configs/vaihingen/logcanplus.py \
  --ckpt work_dirs/logcanplus_vaihingen/epoch=45.ckpt 

๐ŸŒŸ Citation

If you find our repo useful for your research, please consider giving a ๐ŸŒŸ and citing our work below.
@inproceedings{logcan,
  title={Log-can: local-global class-aware network for semantic segmentation of remote sensing images},
  author={Ma, Xiaowen and Ma, Mengting and Hu, Chenlu and Song, Zhiyuan and Zhao, Ziyan and Feng, Tian and Zhang, Wei},
  booktitle={ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
  pages={1--5},
  year={2023},
  organization={IEEE}
}
@inproceedings{sacanet,
  title={Sacanet: scene-aware class attention network for semantic segmentation of remote sensing images},
  author={Ma, Xiaowen and Che, Rui and Hong, Tingfeng and Ma, Mengting and Zhao, Ziyan and Feng, Tian and Zhang, Wei},
  booktitle={2023 IEEE International Conference on Multimedia and Expo (ICME)},
  pages={828--833},
  year={2023},
  organization={IEEE}
}

@article{docnet,
  title={DOCNet: Dual-Domain Optimized Class-Aware Network for Remote Sensing Image Segmentation},
  author={Ma, Xiaowen and Che, Rui and Wang, Xinyu and Ma, Mengting and Wu, Sensen and Feng, Tian and Zhang, Wei},
  journal={IEEE Geoscience and Remote Sensing Letters},
  year={2024},
  publisher={IEEE}
}

@ARTICLE{logcan++,
  author={Ma, Xiaowen and Lian, Rongrong and Wu, Zhenkai and Guo, Hongbo and Yang, Fan and Ma, Mengting and Wu, Sensen and Du, Zhenhong and Zhang, Wei and Song, Siyang},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={LOGCAN++: Adaptive Local-Global Class-Aware Network For Semantic Segmentation of Remote Sensing Images}, 
  year={2025},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/TGRS.2025.3541871}}

@article{scsm,
title = {A novel scene coupling semantic mask network for remote sensing image segmentation},
journal = {ISPRS Journal of Photogrammetry and Remote Sensing},
volume = {221},
pages = {44-63},
year = {2025},
issn = {0924-2716},
doi = {https://doi.org/10.1016/j.isprsjprs.2025.01.025},
url = {https://www.sciencedirect.com/science/article/pii/S0924271625000255},
author = {Xiaowen Ma and Rongrong Lian and Zhenkai Wu and Renxiang Guan and Tingfeng Hong and Mengjiao Zhao and Mengting Ma and Jiangtao Nie and Zhenhong Du and Siyang Song and Wei Zhang},
}

@misc{centerseg,
      title={Center-guided Classifier for Semantic Segmentation of Remote Sensing Images}, 
      author={Wei Zhang and Mengting Ma and Yizhen Jiang and Rongrong Lian and Zhenkai Wu and Kangning Cui and Xiaowen Ma},
      year={2025},
      eprint={2503.16963},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2503.16963}, 
}

๐Ÿ“ฎ Contact

If you are confused about the content of our paper or look forward to further academic exchanges and cooperation, please do not hesitate to contact us. The e-mail address is xwma@zju.edu.cn. We look forward to hearing from you!

๐Ÿ’ก Acknowledgement

Thanks to previous open-sourced repo: