This is the official Pytorch implementation code of paper Context aggregation network for semantic labeling in aerial images
.
Please refer to this file requirements.txt.
- Download ISPRS Vaihingen and Potsdam datasets on the website by following its instructions.
- Put these datasets in corresponding
dataset
subfolder. Note that original colorful labels need to be converted to index-based (0,1,2,3,4,5) image using this code. - Run this command to train CAN model on ISPRS Vaihingen dataset, or Potsdam dataset by replacing
isprs_vaihingen.yml
withisprs_potsdam.yml
. You can set many customized parameters in the.yml
file.:
python train.py --config configs/isprs_vaihingen.yml
Trained models used in benchmark evaluation for testing are provided in Mega.
If you use my_loader.py
as dataloader function, the dataset folder should have the following structure:
├── "dataset_name"
| ├── train
| ├── train_labels
| ├── val
| ├── val_labels
| ├── test
| ├── test_labels
This repo is heavily based on the framework provided by pytorch-semseg. You can refer to that repo for more details.
If this is helpful for you, please consider to cite this article:
@article{cheng2019context,
title={Context Aggregation Network for Semantic Labeling in Aerial Images},
author={Cheng, Wensheng and Yang, Wen and Wang, Min and Wang, Gang and Chen, Jinyong},
journal={Remote Sensing},
volume={11},
number={10},
pages={1158},
year={2019},
publisher={Multidisciplinary Digital Publishing Institute}
}