Skip to content

HuangWBill/GSMF-RS-DIL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domain-Incremental Learning for Remote Sensing Semantic Segmentation with Multifeature Constraints in Graph Space

GSMF-RS-DIL

Wubiao Huang, Mingtao Ding, Fei Deng*

This repository is an official implementation of [Paper] [PDF]

img


Table of Contents


News

  • [2024-11-10] The models have been released.
  • [2024-11-01] The codes have been released.
  • [2024-10-14] The paper has been accepted by IEEE Transactions on Geoscience and Remote Sensing (TGRS).

Abstract

The use of deep learning techniques for semantic segmentation in remote sensing has been increasingly prevalent. Effectively modeling remote contextual information and integrating high-level abstract features with low-level spatial features are critical challenges for semantic segmentation task. This paper addresses these challenges by constructing a Graph Space Reasoning (GSR) module and a Dual-channel Cross Attention Upsampling (DCAU) module. Meanwhile, a new domain incremental learning (DIL) framework is designed to alleviate catastrophic forgetting when the deep learning model is used in cross-domain. This framework makes a balance between retaining prior knowledge and acquiring new information through the use of frozen feature layers and multi-feature joint loss optimization. Base on this, a new domain incremental learning of remote sensing semantic segmentation with multifeature constraints in graph space (GSMF-RS-DIL) framework is proposed. Extensive experiments, including ablation experiments on the ISPRS and LoveDA datasets, demonstrate that the proposed method achieves superior performance and optimal computational efficiency in both single-domain and cross-domain tasks. The code is publicly available at https://github.com/HuangWBill/GSMF-RS-DIL.

Dependencies_and_installation

# 0. Basic environmental 
anaconda, cuda==11.1

# 1. create new anaconda env
conda create -n GSMF_RS_DIL python=3.8
conda activate GSMF_RS_DIL

# 2. git clone this repository
git clone https://github.com/HuangWBill/GSMF-RS-DIL.git
cd GSMF-RS-DIL

# 3. install torch and dependencies
pip install -r requirements.txt

# The mmcv, mmengine, mmsegmentation, torch, torchaudio and torchvision versions are strict.

Dataset

DatasetClassLinkStorage path
Potsdamimpervious surfaces, building, low vegetation,tree, car, background [ISPRS]data\Potsdam_IRRG_tif_512
Vaihingendata\Vaihingen_IRRG_tif_512
Urbanbuildings, road, water, barren, forest, agriculture, background [LoveDA]data\LoveDA_Urban_512
Ruraldata\LoveDA_Rural_512
  • The datasets used in the paper are all publicly available and can be downloaded and preprocessed according to the description in the paper.
  • Strictly organize data according to the example data.
  • The ISPRS_IRRG dataset consists of the Potsdam and Vaihingen datasets, the LoveDA_all dataset consists of the Urban and Rural datasets.
  • GS-AUFPN experiment uses Potsdam_IRRG_tif_512 or LoveDA_Urban_512, GSMF-RS-DIL experiment uses ISPRS_IRRG_512 or LoveDA_all_512

Usage

# train GS-AUFPN in Potsdam
python tools/train/train_GS-AUFPN.py --config configs/gs_aufpn_r101-d8_4xb4-80k_Potsdam-512x512.py --work-dir result/GS-AUFPN-Potsdam

# train GS-AUFPN in Urban
python tools/train/train_GS-AUFPN.py --config configs/gs_aufpn_r101-d8_4xb4-80k_Urban-512x512.py --work-dir result/GS-AUFPN-LoveDA_Urban

# test GS-AUFPN in Potsdam
python tools/test/test_GS-AUFPN.py --config configs/gs_aufpn_r101-d8_4xb4-80k_Potsdam-512x512.py --checkpoint result/GS-AUFPN-Potsdam/iter_80000_potsdam.pth --work-dir result/GS-AUFPN-Potsdam/result --out result/GS-AUFPN-Potsdam/result/dataset_pre  

# test GS-AUFPN in Urban
python tools/test/test_GS-AUFPN.py --config configs/gs_aufpn_r101-d8_4xb4-80k_Urban-512x512.py --checkpoint result/GS-AUFPN-LoveDA_Urban/iter_80000_urban.pth --work-dir result/GS-AUFPN-LoveDA_Urban/result --out result/GS-AUFPN-LoveDA_Urban/result/dataset_pre

# checkpoint format conversion
python tools/checkpoint_process.py --dataset_name 'ISPRS'
python tools/checkpoint_process.py --dataset_name 'LoveDA'

# train GSMF-RS-DIL in ISPRS
python tools/train/train_GSMF-RS-DIL.py --config configs/gsmf_rs_dil_r101-d8_4xb4-80k_ISPRS-512x512.py --work-dir result/GSMF-RS-DIL-ISPRS

# train GSMF-RS-DIL in LoveDA
python tools/train/train_GSMF-RS-DIL.py --config configs/gsmf_rs_dil_r101-d8_4xb4-80k_LoveDA-512x512.py --work-dir result/GSMF-RS-DIL-LoveDA

# test GSMF-RS-DIL in ISPRS
python tools/test/test_GSMF-RS-DIL.py --config configs/gsmf_rs_dil_r101-d8_4xb4-80k_ISPRS-512x512.py --checkpoint result/GSMF-RS-DIL-ISPRS/iter_10000_isprs.pth --work-dir result/GSMF-RS-DIL-ISPRS/result --out result/GSMF-RS-DIL-ISPRS/result/dataset_pre  

# test GSMF-RS-DIL in LoveDA
python tools/test/test_GSMF-RS-DIL.py --config configs/gsmf_rs_dil_r101-d8_4xb4-80k_LoveDA-512x512.py --checkpoint result/GSMF-RS-DIL-LoveDA/iter_10000_loveda.pth --work-dir result/GSMF-RS-DIL-LoveDA/result --out result/GSMF-RS-DIL-LoveDA/result/dataset_pre

Models_and_results

  • train log and model download
Model Domain A Domain B Device Iterations mIoU of Domain A mIoU of Domain B Log checkpoint
GS-AUFPN Potsdam_IRRG_tif_512 —— RTX4090 80000 74.87 —— log download
GS-AUFPN Vaihingen_IRRG_tif_512 —— RTX4090 80000 69.77 —— log download
GS-AUFPN LoveDA_Urban_512 —— RTX4090 80000 44.41 —— log download
GS-AUFPN LoveDA_Rural_512 —— RTX4090 80000 35.89 —— log download
GSMF-RS-DIL Potsdam_IRRG_tif_512 Vaihingen_IRRG_tif_512 RTX4090 80000 61.91 65.81 log download
GSMF-RS-DIL LoveDA_Urban_512 LoveDA_Rural_512 RTX4090 80000 51.02 36.21 log download
  • Results of single domain

Table 1. Quantitative comparison results with State-of-the-art network.

MethodPotsdamUrban
OA (%)mF1 (%)mIoU (%)OA (%)mF1 (%)mIoU (%)
DeepLabV3+88.6583.5273.9456.8258.6343.76
PSANet88.6283.9274.2557.6059.1644.27
PSPNet88.6983.7774.1656.9158.2943.38
Pointrend88.2182.1272.5154.4356.3542.55
DANet88.4483.0173.3856.2158.4343.62
CCNet88.5683.3873.7755.9558.2043.91
GS-AUFPN (ours)88.7284.5674.8757.4359.7144.41

img

img

img

  • Results of cross domain

Table 2. Quantitative comparison results with other cross domain training methods.

PotsdamVaihingenΔmIoU(%) UrbanRuralΔmIoU(%)
mIoU(%)ΔbmIoU(%)mIoU(%)ΔbmIoU(%)mIoU(%)ΔbmIoU(%)mIoU(%)ΔbmIoU(%)
Single task (A-A)74.87——69.77————44.41——35.89————
Single task (A-B)————28.09-59.74——————28.52-20.54——
Multi task74.45-00.5666.84-4.20-2.3853.91+21.3935.71-0.50+10.45
Fine-tune54.82-26.7867.21-3.67-15.2249.92+12.4135.26-1.76+5.33
LwF62.53-16.4863.8-8.55-12.5249.92+12.4134.82-2.98+4.71
GSMF-RS-DIL (ours)61.91-17.3165.81-5.67-11.4951.02+14.8436.21+0.89+7.89

img

img

Citation

Please kindly cite the papers if this code is useful and helpful for your research:

@article{huang2024gsmfrsdil,
  title = {Domain-Incremental Learning for Remote Sensing Semantic Segmentation with Multifeature Constraints in Graph Space},
  author = {Huang, Wubiao and Ding, Mingtao and Deng, Fei},
  journal = {IEEE Transactions on Geoscience and Remote Sensing},
  volume = {62},
  number = {},
  pages = {1-15},
  year = {2024},
  DOI = {10.1109/TGRS.2024.3481875}
}

Acknowledgement

This implementation is based on MMSegmentation. Thanks for the awesome work.

Contact

If you have any questions or suggestions, feel free to contact Wubiao Huang.

About

Domain-incremental learning for remote sensing semantic segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages