# SMGNet Official Pytorch Code base for "SMGNet:A Semantic Map-Guided Multitask Neural Network for Remote Sensing Image Semantic Change Detection" [Project](https://github.com/long123524/SMGNet) ## Introduction We propose a novel multitask network (i.e., SMGNet) that fully integrates available semantic information derived from historical maps, with the aim of improving the under-detection of changed areas and misclassiffcation of changed classes derived from high-resolution satellite images.

## Using the code: The code is stable while using Python 3.9.0, CUDA >=11.0 - Clone this repository: ```bash git clone https://github.com/long123524/SMGNet cd SMGNet ``` To install all the dependencies using conda or pip: ``` PyTorch TensorboardX OpenCV numpy tqdm skimage ... ``` ## Data Format Make sure to put the files as the following structure: ``` inputs └── ├── image1 | ├── 001.tif │ ├── 002.tif │ ├── 003.tif │ ├── ... | └── image2 | ├── 001.tif | ├── 002.tif | ├── 003.tif | ├── ... └── label1 | ├── 001.tif | ├── 002.tif | ├── 003.tif | ├── ... └── label2 | ├── 001.tif | ├── 002.tif | ├── 003.tif | ├── ... └── prior_t1 | ├── 001.tif | ├── 002.tif | ├── 003.tif | ├── ... └── ... ``` For testing and validation datasets, the same structure as the above. ## Datasets A preprocessed data of HRSCD is available at https://pan.baidu.com/s/14FQNhSr-D8i1N3zeCqg0nQ code: m9u7 ## Training and testing 1. Train the model. ``` python train_SPG.py. ``` 2. Test the model. ``` python pred_SCD.py. ``` 3. Accuracy evaluation. ``` python Eval_SCD.py. ``` ## A pretrained weight A pretrained weight of PVT-V2 on the ImageNet dataset is provided: https://drive.google.com/file/d/1uzeVfA4gEQ772vzLntnkqvWePSw84F6y/view?usp=sharing ### Acknowledgements: This code-base uses certain code-blocks and helper functions from [HGINet](https://github.com/long123524/HGINet-torch) and [BiSRNet](https://github.com/DingLei14/Bi-SRNet). ### Citation: If you find this work useful or interesting, please consider citing the following references. ``` @article{long2025, title={SMGNet:A Semantic Map-Guided Multitask Neural Network for Remote Sensing Image Semantic Change Detection}, author={Long, Jiang and Liu, Sicong and Li, Mengmeng}, journal={IEEE GEOSCIENCE AND REMOTE SENSING LETTERS}, volume={22}, pages={1--5}, year={2025}, publisher={IEEE} } @article{long2025, title={BGSNet: A boundary-guided Siamese multitask network for semantic change detection from high-resolution remote sensing images}, author={Long, Jiang and Liu, Sicong and Li, Mengmeng and Zhao, Hang and Jin, Yanmin}, journal={ISPRS Journal of Photogrammetry and Remote Sensing}, volume={225}, pages={221--237}, year={2025}, publisher={Elsevier} } @article{long2024, title={Semantic change detection using a hierarchical semantic graph interaction network from high-resolution remote sensing images}, author={Long, Jiang and Li, Mengmeng and Wang, Xiaoqin and Stein, Alfred}, journal={ISPRS Journal of Photogrammetry and Remote Sensing}, volume={211}, pages={318--335}, year={2024}, publisher={Elsevier} } ```