This repository maintains the official implementation of the paper Learning to Aggregate Multi-Scale Context for Instance Segmentation in Remote Sensing Images by Ye Liu, Huifang Li, Chao Hu, Shuang Luo, Yan Luo, and Chang Wen Chen.
Please refer to the following environmental settings that we use. You may install these packages by yourself if you meet any problem during automatic installation.
- CUDA 10.2 Update 2
- CUDNN 8.0.5.39
- Python 3.9.7
- PyTorch 1.10.0
- MMCV 1.3.17
- MMDetection 2.17.0
- NNCore 0.3.2
- Clone the repository from GitHub.
git clone https://github.com/yeliudev/CATNet.git
cd CATNet
- Install dependencies.
pip install -r requirements.txt
- Download and extract the datasets.
Note that the images in iSAID dataset are splitted into patches with both sides no more than 512 pixels, as reported in our paper. We strongly recommend using this pre-processed version directly since the offical toolkit has known unknown bugs, leading to undesirable patch sizes (e.g. extreme aspect ratios).
- Prepare the files in the following structure.
CATNet
โโโ configs
โโโ datasets
โโโ models
โโโ tools
โโโ data
โ โโโ dior
โ โ โโโ Annotations
โ โ โโโ ImageSets
โ โ โโโ JPEGImages-test
โ โ โโโ JPEGImages-trainval
โ โโโ hrsid
โ โ โโโ annotations
โ โ โโโ images
โ โโโ isaid
โ โ โโโ annotations
โ โ โโโ train
โ โ โโโ val
โ โโโ vhr
โ โโโ ground truth
โ โโโ positive image set
โโโ README.md
โโโ setup.cfg
โโโ ยทยทยท
- Convert DIOR annotations to PASCAL VOC format.
python tools/convert_dior.py
- Convert NWPU VHR-10 annotations to COCO format.
python tools/convert_vhr.py
Run the following command to train a model using a specified config.
torchrun --nproc_per_node=4 tools/train.py <path-to-config>
Run the following command to test a model and evaluate results.
torchrun --nproc_per_node=4 tools/test.py <path-to-config> <path-to-checkpoint>
We provide multiple pre-trained models here. All the models are trained using 4 NVIDIA Tesla V100-SXM2 GPUs and are evaluated using the default metrics of the datasets.
Dataset | Model | Backbone | Schd | Aug | Performance | Download | |
---|---|---|---|---|---|---|---|
BBox AP | Mask AP | ||||||
iSAID | CAT Mask R-CNN | ResNet-50 | 1x | โ | 46.2 | 38.5 | model | metrics |
CAT Mask R-CNN | ResNet-50 | 1x | โ | 47.6 | 40.1 | model | metrics | |
DIOR | CATNet | ResNet-50 | 3x | โ | 76.3 | โ | model | metrics |
CATNet | ResNet-50 | 3x | โ | 78.6 | โ | model | metrics | |
CAT R-CNN | ResNet-50 | 3x | โ | 77.7 | โ | model | metrics | |
CAT R-CNN | ResNet-50 | 3x | โ | 81.9 | โ | model | metrics | |
NWPU VHR-10 |
CATNet | ResNet-50 | 6x | โ | 95.8 | โ | model | metrics |
CATNet | ResNet-50 | 6x | โ | 97.4 | โ | model | metrics | |
CAT R-CNN | ResNet-50 | 6x | โ | 96.4 | โ | model | metrics | |
CAT R-CNN | ResNet-50 | 6x | โ | 97.7 | โ | model | metrics | |
HRSID | CAT Mask R-CNN | ResNet-50 | 3x | โ | 71.7 | 58.2 | model | metrics |
CAT Mask R-CNN | ResNet-50 | 3x | โ | 73.3 | 59.6 | model | metrics | |
CAT R-CNN | ResNet-50 | 3x | โ | 70.5 | โ | model | metrics | |
CAT R-CNN | ResNet-50 | 3x | โ | 72.8 | โ | model | metrics |
If you find this project useful for your research, please kindly cite our paper.
@techreport{liu2021learning,
title={Learning to Aggregate Multi-Scale Context for Instance Segmentation in Remote Sensing Images},
author={Liu, Ye and Li, Huifang and Hu, Chao and Luo, Shuang and Luo, Yan and Chen, Chang Wen},
number={arXiv:2111.11057},
year={2021}
}