st-dasegnet
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.7%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: cv516Buaa
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 18.4 MB
Statistics
- Stars: 25
- Watchers: 1
- Forks: 4
- Open Issues: 10
- Releases: 0
Metadata Files
README.md
ST-DASegNet
This repo is the implementation of "Self-Training Guided Disentangled Adaptation for Cross-Domain Remote Sensing Image Semantic Segmentation". we refer to MMSegmentation and MMGeneration. Many thanks to SenseTime and their two excellent repos.
![]() |
![]() |
Dataset Preparation
We select Postsdam, Vaihingen and LoveDA as benchmark datasets and create train, val, test list for researchers to follow.
In the following, we provide the detailed commands for dataset preparation.
Potsdam
Move the ‘3_Ortho_IRRG.zip’ and ‘5_Labels_all_noBoundary.zip’ to Potsdam_IRRG folder
Move the ‘2_Ortho_RGB.zip’ and ‘5_Labels_all_noBoundary.zip’ to Potsdam_RGB folder
python tools/convert_datasets/potsdam.py yourpath/ST-DASegNet/data/Potsdam_IRRG/ --clip_size 512 --stride_size 512
python tools/convert_datasets/potsdam.py yourpath/ST-DASegNet/data/Potsdam_RGB/ --clip_size 512 --stride_size 512
Vaihingen
Move the 'ISPRS_semantic_labeling_Vaihingen.zip' and 'ISPRS_semantic_labeling_Vaihingen_ground_truth_eroded_COMPLETE.zip' to Vaihingen_IRRG folder
python tools/convert_datasets/vaihingen.py yourpath/ST-DASegNet/data/Vaihingen_IRRG/ --clip_size 512 --stride_size 256
LoveDA
Unzip Train.zip, Val.zip, Test.zip and create Train, Val and Test list for Urban and Rural
Sentinel-2
python tools/convert_datasets/Sentinel-2.py ./data/yourpath --out_dir ./data/Sentinel2
GID (GF-2)
python tools/convert_datasets/GF-2.py ./data/yourpath/GID/Large-scale_Classification_5classes/image_NirRGB --out_dir ./data/GID_G2R/ --clip_size 1024 --stride_size 1024
python tools/convert_datasets/GF-2.py ./data/yourpath/GID/Large-scale_Classification_5classes/label_5classes --out_dir ./data/GID_G2R/ --clip_size 1024 --stride_size 1024
CITY-OSM: CHICAGO and PARIS
python tools/convert_datasets/CITY-OSM.py ./data/yourpath/CITY-OSM/paris/ --out_dir ./data/CITY_paris/ --clip_size 512 --stride_size 512
python tools/convert_datasets/CITY-OSM.py ./data/yourpath/CITY-OSM/chicago/ --out_dir ./data/CITY_chicago/ --clip_size 512 --stride_size 512
ST-DASegNet
Install
requirements:
python >= 3.7
pytorch >= 1.4
cuda >= 10.0
prerequisites: Please refer to MMSegmentation PREREQUISITES.
``` cd ST-DASegNet
pip install -e .
chmod 777 ./tools/dist_train.sh
chmod 777 ./tools/dist_test.sh ```
Training
mit_b5.pth : google drive For SegFormerb5 based ST-DASegNet training, we provide ImageNet-pretrained backbone here.
We select deeplabv3 and Segformerb5 as baselines. Actually, we use deeplabv3+, which is a more advanced version of deeplabv3. After evaluating, we find that deeplabv3+ has little modification compared to deeplabv3 and has little advantage than deeplabv3.
For LoveDA results, we evaluate on test datasets and submit to online server (https://github.com/Junjue-Wang/LoveDA) (https://codalab.lisn.upsaclay.fr/competitions/424). We also provide the evaluation results on validation dataset.
![]() |
![]() |
Potsdam IRRG to Vaihingen IRRG:
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/deeplabv3/config/ST-DASegNetdeeplabv3plusr50-d84x4512x51240kPotsdam2Vaihingen.py 2 ./tools/disttrain.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kPotsdam2Vaihingen.py 2 ```
Vaihingen IRRG to Potsdam IRRG:
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/deeplabv3/config/ST-DASegNetdeeplabv3plusr50-d84x4512x51240kVaihingen2Potsdam.py 2 ./tools/disttrain.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kVaihingen2Potsdam.py 2 ```
Potsdam RGB to Vaihingen IRRG:
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/deeplabv3/config/ST-DASegNetdeeplabv3plusr50-d84x4512x51240kPotsdamRGB2Vaihingen.py 2 ./tools/disttrain.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kPotsdamRGB2Vaihingen.py 2 ```
Vaihingen RGB to Potsdam IRRG:
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/deeplabv3/config/ST-DASegNetdeeplabv3plusr50-d84x4512x51240kVaihingen2PotsdamRGB.py 2 ./tools/disttrain.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kVaihingen2PotsdamRGB.py 2 ```
LoveDA Rural to Urban
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/deeplabv3/configLoveDA/ST-DASegNetdeeplabv3plusr50-d84x4512x51240kR2U.py 2 ./tools/disttrain.sh ./experiments/segformerb5/configLoveDA/ST-DASegNetsegformerb5769x76940kR2U.py 2 ```
LoveDA Urban to Rural
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/deeplabv3/configLoveDA/ST-DASegNetdeeplabv3plusr50-d84x4512x51240kU2R.py 2 ./tools/disttrain.sh ./experiments/segformerb5/configLoveDA/ST-DASegNetsegformerb5769x76940kU2R.py 2 ```
LoveDA R-G-B Rural to LandCoverNet Sentinel-2
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/segformerb5/configS2LoveDA/ST-DASegNetsegformerb5769x76940kR2S.py 2 ```
LoveDA R-G-B Rural to GID
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/segformerb5/configGF2LoveDA/ST-DASegNetsegformerb5769x76940kR2G.py 2 ```
Paris to Chicago
``` cd ST-DASegNet
./tools/disttrain.sh ./experiments/segformerb5/configParis2Chicago/ST-DASegNetsegformerb5769x76940kP2C.py 2 ```
Testing
Trained with the above commands, you can get a trained model to test the performance of your model.
Testing commands
``` cd ST-DASegNet
./tools/disttest.sh yourpath/config.py yourpath/trainedmodel.pth --eval mIoU
./tools/disttest.sh yourpath/config.py yourpath/trainedmodel.pth --eval mFscore ```Testing cases: P2VIRRG64.33.pth and V2PIRRG59.65.pth : google drive
``` cd ST-DASegNet
./tools/disttest.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kPotsdam2Vaihingen.py 2 ./experiments/segformerb5/ST-DASegNetresults/P2VIRRG64.33.pth --eval mIoU
./tools/disttest.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kPotsdam2Vaihingen.py 2 ./experiments/segformerb5/ST-DASegNetresults/P2VIRRG64.33.pth --eval mFscore `````` cd ST-DASegNet
./tools/disttest.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kVaihingen2Potsdam.py 2 ./experiments/segformerb5/ST-DASegNetresults/V2PIRRG59.65.pth --eval mIoU
./tools/disttest.sh ./experiments/segformerb5/config/ST-DASegNetsegformerb5769x76940kVaihingen2Potsdam.py 2 ./experiments/segformerb5/ST-DASegNetresults/V2PIRRG59.65.pth --eval mFscore ```
The ArXiv version of this paper is release. ST-DASegNet_arxiv. This paper has been published on JAG, please refer to Self-Training Guided Disentangled Adaptation for Cross-Domain Remote Sensing Image Semantic Segmentation.
If you have any question, please discuss with me by sending email to lyushuchang@buaa.edu.cn.
References
Many thanks to their excellent works * MMSegmentation * MMGeneration * DAFormer
Owner
- Name: cv516Buaa
- Login: cv516Buaa
- Kind: user
- Location: Beijing,China
- Company: Beihang University
- Repositories: 2
- Profile: https://github.com/cv516Buaa
Pattern Recognition and Artificial Intelligence Group Prof.Qi Zhao & Lijiang Chen Dr. Shuchang Lyu & Binghao Liu & Chunlei Wang
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - name: "MMSegmentation Contributors" title: "OpenMMLab Semantic Segmentation Toolbox and Benchmark" date-released: 2020-07-10 url: "https://github.com/open-mmlab/mmsegmentation" license: Apache-2.0
GitHub Events
Total
- Watch event: 4
- Issue comment event: 2
Last Year
- Watch event: 4
- Issue comment event: 2
Dependencies
- pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
- pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
- cityscapesscripts *
- codecov *
- flake8 *
- interrogate *
- isort ==4.3.21
- matplotlib *
- numpy *
- packaging *
- prettytable *
- pytest *
- xdoctest >=0.10.0
- yapf *
- docutils ==0.16.0
- myst-parser *
- sphinx ==4.0.2
- sphinx_copybutton *
- sphinx_markdown_tables *
- mmcv-full >=1.3.1,<=1.4.0
- cityscapesscripts *
- mmcv *
- prettytable *
- torch *
- torchvision *
- matplotlib *
- numpy *
- packaging *
- prettytable *
- codecov * test
- flake8 * test
- interrogate * test
- isort ==4.3.21 test
- pytest * test
- xdoctest >=0.10.0 test
- yapf * test



