Giter VIP home page Giter VIP logo

dual-hrnet's Introduction

Dual-HRNet for Building Localization and DamageClassification

Abstact

Comparison of pre-disaster and post-disaster on satellites imagery play an important roles for the humanitarian assistance and disaster relief (HADR) efforts while severe global events. Automatic comparison using AI helps identify the affected area. In this study, we propose Dual-HRNets for both localizing buildings and classifying their damage level on the satellite imagery simultaneously. Since the goal of this study is to predict the location of buildings on the pre-disaster image as well as classify the damage level in accordance with the post-disaster image, our Dual-HRNets take a pair of pre- and post-disaster images over each HRNet. Each intermediate stage of Dual-HRNet, the features of each HRNet are fused by a fusion block. Our experiments present a good performance of Dual-HRNets for the task of both localization and classification. Our approach with Dual-HRNet achieved the 5th place in xView2 challenge over 3,500 participants.

Please see the white paper for detail

Qualitative results of Dual-HRNet

From left to right, the figures shows pre-disaster images, results of Dual-HRnet and post-disaster images. White, yellow, orange and red regions represent nodamage, minor damage, major damage and destroyed respectively.

Quick start

Install

Install PyTorch=1.4 following the official instructions.

Please refer to submission/Dockerfile

Dataset Tree

root
├── train
│      ├── images 
│      │      └── <image_id>.png
│      │      └── ...
│      └── labels
│             └── <image_id>.json
│             └── ...
├── tier3
│      ├── images 
│      │      └── ...
│      │      └── <image_id>.png
│      │      └── ...
│      └── labels
│             └── <image_id>.json
│             └── ...
└── tset
       └── images 
              └── <image_id>.png
              └── ...

Train and test

Please batch size in configuration file(dual-hrnet.yaml) for your environment.

Single GPU Train

python train_net.py --data_dir=PATH_TO_XVIEW2_DATASET \
                    --config_file configs/dual-hrnet.yaml [default='configs/dual-hrnet.yaml'] \
                    --ckpt_save_dir=PATH_TO_SAVE_CHECKPOINTS [defaults='ckpt/dual-hrnet']

Multi GPU Train

python -m torch.distributed.launch \
       --nproc_per_node=NUMBER_OF_GPUS \
       train_net.py --data_dir=PATH_TO_XVIEW2_DATASET \
                    --config_file configs/dual-hrnet.yaml [default='configs/dual-hrnet.yaml'] \
                    --ckpt_save_dir=PATH_TO_SAVE_CHECKPOINTS [defaults='ckpt/dual-hrnet']
 

Test

python test_net.py --config_file configs/dual-hrnet.yaml \
                   --ckpt_path=PATH_TO_LOAD_CHECKPOINTS

License

Dual-HRNet is released under the MIT license.

Acknowledgement

We modified code based on HRNet Semantic Segmentation(https://github.com/HRNet/HRNet-Semantic-Segmentation)

dual-hrnet's People

Contributors

jameskoo avatar mikigom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.