{"id":13785286,"url":"https://github.com/liumency/SRCDNet","last_synced_at":"2025-05-11T20:32:44.278Z","repository":{"id":45515488,"uuid":"337736058","full_name":"liumency/SRCDNet","owner":"liumency","description":"The pytorch implementation for \"Super-resolution-based Change Detection Network with Stacked Attention Module for Images with Different Resolutions \".","archived":false,"fork":false,"pushed_at":"2022-06-14T05:13:49.000Z","size":41,"stargazers_count":67,"open_issues_count":15,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-17T21:39:17.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liumency.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-10T13:42:03.000Z","updated_at":"2024-11-08T07:33:20.000Z","dependencies_parsed_at":"2022-07-17T14:19:20.701Z","dependency_job_id":null,"html_url":"https://github.com/liumency/SRCDNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liumency%2FSRCDNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liumency%2FSRCDNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liumency%2FSRCDNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liumency%2FSRCDNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liumency","download_url":"https://codeload.github.com/liumency/SRCDNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253632304,"owners_count":21939374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T19:00:58.810Z","updated_at":"2025-05-11T20:32:43.952Z","avatar_url":"https://github.com/liumency.png","language":"Python","readme":"## SRCDNet\n\nThe pytorch implementation for \"[Super-resolution-based Change Detection Network with Stacked Attention Module for Images with Different Resolutions](https://ieeexplore.ieee.org/document/9472869) \" on IEEE Transactions on Geoscience and Remote Sensing.  \n\nThe **SRCDNet** is designed to learn and predict change maps from bi-temporal images with different resolutions, which can be neatly turned into a **CDNet** and applied to images without any resolution difference.\n\n\n\n## Requirements\n\n- Python 3.6\n\n- Pytorch 1.2.0\n\n## Datasets\n\n- Download the [BCDD Dataset](http://gpcv.whu.edu.cn/data/building_dataset.html)\n- Download the [CDD Dataset](https://drive.google.com/file/d/1GX656JqqOyBi_Ef0w65kDGVto-nHrNs9/edit)\n\nSince the intial BCDD and CDD dataset only contains bi-temporal images with the same resolution, in our experiment, images of the latter phase are down-samplinged by 4 and 8 times to simulate resolution difference of 4 and 8 times (4x and 8x), respectively. \n\nThe data folder is structured as follows:\n\n```\n├── data/   \n│   ├── CDD/    # CDD dataset\n|   |   ├── train/    # traning set \n|   |   |   ├── time1/    #images of time t1\n|   |   |   ├── time2/    #images of time t2\n|   |   |   ├── time2_lr/    #lower resolution images of time t2\n|   |   |   |   ├── X4.00/    #4 times resolution difference\n|   |   |   |   ├── X8.00/    #8 times resolution difference\n|   |   |   ├── label/    #ground truth\n|   |   ├── val/    # validation set, have the same structure of the training set \n│   ├── BCDD/    # BCDD dataset, have the same structure of the CDD dataset\n│   └── \t\t\t\n└── epochs/    # path to save the model\n│   ├── CD/     \n│   ├── SR/\n│   └── \n...\n```\n\n\n## Train Examples \n\n- Train **SRCDNet** on **CDD** with **4x** resolution difference \n\n```\npython train_srcd.py  --scale 4 \n--hr1_train '../data/CDD/train/time1' \n--lr2_train '../data/CDD/train/time2_lr/X4.00'\n--hr2_train '../data/CDD/train/time2'\n--lab_train '../data/CDD/train/label'\n--hr1_val '../data/CDD/val/time1'\n--lr2_val '../data/CDD/val/time2_lr/X4.00'\n--hr2_val '../data/CDD/val/time2'\n--lab_val '../data/CDD/val/label' \n--model_dir 'epochs/X4.00/CD/'\n--sr_dir 'epochs/X4.00/SR/'\n--sta_dir 'statistics/CDD_4x.csv'\n```\n\n***Note** that more optional arguments could be found and retified in **configures.py**, including: num_epochs, gpu_id, batchsize, lr, etc. \n\n\n\n- Train **SRCDNet** on **BCDD** with **8x** resolution difference \n\n```\npython train_srcd.py  --scale 8 \n--hr1_train '../data/BCDD/train/time1' \n--lr2_train '../data/BCDD/train/time2_lr/X4.00'\n--hr2_train '../data/BCDD/train/time2'\n--lab_train '../data/BCDD/train/label'\n--hr1_val '../data/BCDD/val/time1'\n--lr2_val '../data/BCDD/val/time2_lr/X4.00'\n--hr2_val '../data/BCDD/val/time2'\n--lab_val '../data/BCDD/val/label' \n--model_dir 'epochs/X8.00/CD/'\n--sr_dir 'epochs/X8.00/SR/'\n--sta_dir 'statistics/BCDD_8x.csv'\n```\n\n- Train **CDNet** on **CDD** with **no** resolution difference \n\n```\npython train_cd.py  \n--hr1_train '../data/BCDD/train/time1' \n--hr2_train '../data/BCDD/train/time2'\n--lab_train '../data/BCDD/train/label'\n--hr1_val '../data/BCDD/val/time1'\n--hr2_val '../data/BCDD/val/time2'\n--lab_val '../data/BCDD/val/label' \n--model_dir 'epochs/X0.00/CD/'\n--sta_dir 'statistics/CDD_0x.csv'\n```\n\n\n\n## Citation\n\nPlease cite our paper if you use this code in your work:\n\n```\n@ARTICLE{liu2021super,\n  author={Liu, Mengxi and Shi, Qian and Marinoni, Andrea and He, Da and Liu, Xiaoping and Zhang, Liangpei},\n  journal={IEEE Transactions on Geoscience and Remote Sensing}, \n  title={Super-Resolution-Based Change Detection Network With Stacked Attention Module for Images With Different Resolutions}, \n  year={2021},\n  volume={},\n  number={},\n  pages={1-18},\n  doi={10.1109/TGRS.2021.3091758}}\n```\n\n\n\n## Acknowledgment\n\nThis code is heavily borrowed from the [SRGAN](https://github.com/leftthomas/SRGAN) and [STANet](https://github.com/justchenhao/STANet).\n","funding_links":[],"categories":["Multispectral"],"sub_categories":["Deep Learning"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliumency%2FSRCDNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliumency%2FSRCDNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliumency%2FSRCDNet/lists"}