- The pytorch implementation for CAGNet in paper "Cross-Attention Guided Group Aggregation Network for Cropland Change Detection".
- Python 3.6
- Pytorch 1.7.0
The path list in the datasest folder is as follows:
|—train
-
||—A
-
||—B
-
||—OUT
|—val
-
||—A
-
||—B
-
||—OUT
|—test
-
||—A
-
||—B
-
||—OUT
where A contains pre-temporal images, B contains post-temporal images, and OUT contains ground truth images.
- python train.py --dataset-dir dataset-path
- python eval.py --ckp-paths weight-path --dataset-dir dataset-path
- python visualization visualization.py --ckp-paths weight-path --dataset-dir dataset-path (Note that batch-size must be 1 when using visualization.py)
- Besides, you can adjust the parameter of full_to_color to change the color
If this work is helpful to you, please cite it as:
@article{xu2023cross,
title={Cross-Attention Guided Group Aggregation Network for Cropland Change Detection},
author={Xu, Chuan and Ye, Zhaoyi and Mei, Liye and Shen, Sen and Sun, Shaohua and Wang, Ying and Yang, Wei},
journal={IEEE Sensors Journal},
volume={23},
pages={13680-13691},
year={2023},
publisher={IEEE}
}