/UGBS-pytorch

The official pytorch implementation of Exploring the User Guidance for More Accurate Building Segmentation from High-Resolution Remote Sensing Images

Primary LanguagePythonMIT LicenseMIT

Exploring the User Guidance for More Accurate Building Segmentation

This repo is the official PyTorch implementation of Exploring the User Guidance for More Accurate Building Segmentation from High-Resolution Remote Sensing Images. Since this work is still under review, we only provide the test code and related models, and the full code will be released soon.

1. Requirements

  • Hardware: 4-8 GPUs (better with >=11G GPU memory)

  • Software: PyTorch>=1.0.0, Python3, tensorboardX, and so on.

  • to install tensorboardX, you could do as follows:

    pip install tensorboardX
    pip install tensorboard
    
  • install python packages: pip install -r requirements.txt

2. Dataset

Segmentation

Segmentation data structure
  DATA_ROOT
  ├── vegas
  │   ├── vegas_trainval_img_224_jpg
  │   ├── vegas_trainval_label_224_png_01
  │   ├── vegas_test_img_224_jpg
  │   ├── vegas_test_label_224_png_01
  ├── Inria_dataset
  │   ├── inria
  │   │   ├── img
  │   │   ├── inria_split
  │   │   ├── mask_all
  │   │   ├── mask_one
  │   │   ├── polygons.csv
  

3. Model Zoo

Segmentation

train: SpaceNet (Las Vegas)

Annotations Models IoU BF-score B-IoU Notes
Bounding box gdrive 93.7 80.7 39.9
Extreme points gdrive 95.3 87.3 48.5
Inside-outside points gdrive 95.4 86.3 49.4

train: Inria-building dataset

Annotations Models IoU WCov B-Fscore Dice Notes
Bounding box gdrive 92.1 92.2 84.3 95.9
Extreme points gdrive 93.1 93.1 86.9 96.4
Inside-outside points gdrive 92.8 92.9 86.0 96.3

4. Inference

Run on one GPU to evaluate the model, the examples are as follow:

Run the inference job:

sh {tool_name}/evaluate_banet.sh {dataset} {task_name}

An example of testing our method on Vegas:

sh seg_tool/evaluate_banet.sh vegas banet_dextr_res101

Note:

  1. To evaluate segmentation methods with the metrics of CVNet (IoU, WCov, BF-score and Dice), you shoud use seg_tool/evaluate_cvnet.sh

5. License

This project is under the MIT license.