CoolFace
Modelpublic

EVER-Z/torchange_example_changeos_swint_on_xview2_best42k

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes99downloads
Model Card

ChangeOS (Swin-T) — xView2 building damage assessment

ChangeOS with a Swin-T backbone, trained on xView2/xBD with `torchange`.

Scored with the official xView2 mixed metric, 0.3 * localization_F1 + 0.7 * harmonic_mean(damage_F1s), including the single-map constraint and the unlabelled-pixel (255) exclusion rule.

Results

Protocol: train on `train`+`tier3` → select the checkpoint on `test` → report on `hold`. These weights are the test-selected checkpoint, evaluated once on hold.

splitOverall F1Localization F1Damage F1no-damageminormajordestroyed
`hold` (reported)76.9185.0373.4389.3958.0372.7581.25
test (selection)76.6884.6773.2689.9256.2773.5582.56

Training recipe

dataxView2 train (2,799) + tier3 (3,378), 512x512 tiles at stride 256 → 34,081 non-empty patches
augmentationA.D4() (the tiling does the cropping), ImageNet normalisation
backboneswin_t, ImageNet-1k initialised
decoderdual FPN + AssymetricDecoder, 256 ch, fusion_type='2mlps'
headslocalization 1 class, damage 5 classes, both upsampled 4x
lossesBCE + Tversky (localization); cross-entropy + Dice with ignore_index=255 (damage)
optimizerAdamW, weight decay 0.01
LRpoly, base 6e-5, power 0.9
schedule60,000 iters, effective batch 16, bf16, sync BN
hardware2x A100-SXM4-40GB, 3 h 16 min

Reproduction config and commands: examples/xview2_project/ in the torchange repo.

Usage

python
import torchange  # noqa: F401
from torchange.models.changeos import ChangeOS

model = ChangeOS.from_pretrained("EVER-Z/torchange_example_changeos_swint_on_xview2_best42k").eval()

# bitemporal input: pre- and post-event RGB stacked on the channel axis -> (B, 6, H, W)
# eval output: ChangeDetectionModelOutput with
#   change_prediction        (B, 5, H, W)  softmax damage probabilities
#   t1_semantic_prediction   (B, 1, H, W)  sigmoid building footprint
out = model(images)
loc = out['t1_semantic_prediction'] > 0.5
dam = loc * out['change_prediction'].argmax(dim=1)   # single-map constraint; needs B=1

Citation

bibtex
@article{zheng2021changeos,
  title={Building damage assessment for rapid disaster response with a deep object-based semantic change detection framework: From natural disasters to man-made disasters},
  author={Zheng, Zhuo and Zhong, Yanfei and Wang, Junjue and Ma, Ailong and Zhang, Liangpei},
  journal={Remote Sensing of Environment},
  volume={265},
  pages={112636},
  year={2021},
  publisher={Elsevier}
}

@software{zheng2024torchange,
  author = {Zheng, Zhuo},
  title = {torchange: A Unified Change Representation Learning Benchmark Library},
  url = {https://github.com/Z-Zheng/pytorch-change-models},
  year = {2024}
}

@article{gupta2019xbd,
  title={xBD: A dataset for assessing building damage from satellite imagery},
  author={Gupta, Ritwik and Hosfelt, Richard and Sajeev, Sandra and Patel, Nirav and Goodman, Bryce and Doshi, Jigar and Heim, Eric and Choset, Howie and Gaston, Matthew},
  journal={arXiv preprint arXiv:1911.09296},
  year={2019}
}