Skip to main content

Pixel-Wise T-Test: Battle damage detection using Sentinel-1 SAR imagery

Project description

Pixel-Wise T-Test

A New Algorithm for Battle Damage Detection using Sentinel-1 Imagery

The generation of public information regarding buildings damaged by conflict has become particularly important in the context of recent, highly destructive wars in Gaza and Ukraine. This paper develops the Pixelwise T-Test (PWTT), a new algorithm for open-access battle damage estimation that is accurate, lightweight, and generalizable. The PWTT addresses many of the problems associated with expense, coverage consistency, and domain shift that affect deep-learning based approaches to building damage detection, and outperforms the state of the art deep learning model on unseen areas.

How it Works

The PWTT utilizes Synthetic Aperture Radar imagery from the Sentinel-1 satellite. The figure below demonstrates the change in backscatter amplitude (i.e., the "loudness" of the signal's echo) for a destroyed building in Mariupol, Ukraine, before and after its destruction. The corresponding Sentinel-1 pixel has a low standard deviation in both the pre-and post-war periods, but experiences a large change in mean amplitude. The T-Test is a simple signal-to-noise ratio that measures the difference between the means of two samples adjusted by the standard deviation within each sample.

The green dashed line and shaded area represent the pixel's mean backscatter amplitude $\pm$ 1 standard deviation prior to the invasion, while the red line and shaded area represent these statistics following the building's destruction.

The diagram below displays the full PWTT process:

Installation

Install via pip directly from GitHub:

pip install git+https://github.com/oballinger/PWTT.git

Or clone and install locally:

git clone https://github.com/oballinger/PWTT.git
cd PWTT
pip install .

This installs the pwtt package and its dependencies (earthengine-api, geemap).

Python Quickstart

First, import the Google Earth Engine python API and authenticate using your credentials and cloud project name.

import ee
import pwtt

project_name='<YOUR PROJECT NAME>'
ee.Authenticate()
ee.Initialize(project=project_name)

The PWTT can be deployed in one line of code. The example below conducts a damage assessment over Gaza for July 2024.

gaza = ee.Geometry.Rectangle([34.21,31.21,34.57,31.60])

pwtt.detect_damage(aoi=gaza, # the area of interest as a bounding box
                   war_start='2023-10-10', # the start of the war
                   inference_start='2024-07-01', # the beginning of the inference window
                   pre_interval=12, # the number of months before the war to use as a reference period 
                   post_interval=1, # the number of months after the war to use as an inference period 
                   viz=True) # visualize the results

By simply modifying the location, war_start date and inference_start dates, damage assessment can be carried out on a new area; below is another example for Bakhmut, Ukraine:

bakhmut = ee.Geometry.Rectangle([37.949421, 48.556181, 38.043834, 48.621584])

pwtt.detect_damage(aoi=bakhmut,
                   war_start='2022-02-22',
                   inference_start='2024-07-01',
                   pre_interval=12,
                   post_interval=1,
                   viz=True)

Validation Data

Accuracy assessments are carried out using an original dataset of 700,500 annotated building footprints, spanning 12 cities in four different countries. This dataset was compiled by spatially joining damage annotations from the United Nations Satellite Centre (UNOSAT) with data on building footprints. The dataset can be downloaded here.

Benchmark Dataset

Country City Footprints Percent Damaged Annotation Date
Palestine Gaza 228728 57.49% 2024-05-03
Ukraine Rubizhne 8899 33.67% 2022-07-09
Ukraine Mariupol 18446 31.42% 2022-05-12
Ukraine Sievierodonetsk 5970 24.32% 2022-07-27
Ukraine Hostomel 4175 14.04% 2022-03-31
Ukraine Irpin 7242 11.28% 2022-03-31
Ukraine Avdiivka 7262 8.7% 2022-09-20
Ukraine Lysychansk 20246 7.42% 2022-09-21
Ukraine Makariv 3514 4.01% 2022-03-16
Ukraine Chernihiv 29929 3.25% 2022-03-22
Ukraine Shchastia 1293 1.93% 2022-07-07
Ukraine Bucha 5739 1.6% 2022-03-31
Ukraine Kharkiv 107976 0.85% 2022-06-15
Ukraine Trostianets 8913 0.72% 2022-03-25
Ukraine Okhtyrka 15905 0.4% 2022-03-25
Ukraine Mykolaiv 60467 0.34% 2022-07-21
Ukraine Melitopol 32373 0.23% 2022-08-02
Ukraine Kramatorsk 21880 0.22% 2022-07-24
Ukraine Kremenchuk 27497 0.11% 2022-06-29
Ukraine Sumy 28265 0.08% 2022-07-08
Syria Raqqa 24689 44.67% 2017-10-21
Syria Aleppo 65870 26.65% 2016-09-18
Iraq Mosul 137794 11.51% 2017-08-04
All All 873072 12.39%

Building footprint data is sourced from the Microsoft Building Footprints dataset, which consists of over 1 billion building footprints derived from high resolution satellite imagery around the world. A building footprint is labeled as damaged if it intersects with a UNOSAT damage annotation point, and labeled undamaged otherwise. UNOSAT annotations are generated manually on the basis of high resolution optical satellite imagery.

Accuracy Assessment

The table below reports the accuracy statistics for the PWTT algorithm in 12 cities, assessed using the benchmark dataset above.

Country City AUC Accuracy F1 Precision Recall N
Palestine Gaza 83.32 75.41 78.2 70.42 87.91 228728
Ukraine Kremenchuk 92.56 98.82 2.73 2.68 2.77 27497
Ukraine Bucha 90.19 98.19 71.9 98.27 56.68 5739
Ukraine Okhtyrka 89.28 98.9 53.14 76.28 40.77 15905
Ukraine Kramatorsk 88.24 97.16 7.92 11.99 5.91 21880
Ukraine Trostianets 86.63 98.44 67.6 80.58 58.23 8913
Ukraine Chernihiv 86.61 94.47 48.29 53.48 44.03 29929
Ukraine Hostomel 84.99 80.44 68.11 63.87 72.95 4175
Ukraine Irpin 83.81 82.93 56.75 52.83 61.3 7242
Ukraine Kharkiv 83.78 97.24 29.37 30.44 28.36 107976
Ukraine Mykolaiv 83.28 98.18 21.61 18.71 25.57 60467
Ukraine Makariv 82.87 90.37 40.69 34.88 48.82 3514
Ukraine Lysychansk 77.91 82.59 50.14 47.38 53.24 20246
Ukraine Rubizhne 77.81 71.38 66.42 62.14 71.33 8899
Ukraine Mariupol 73.85 66.17 71.08 60.78 85.57 18446
Ukraine Shchastia 73.39 96.69 38.31 47.12 32.28 1293
Ukraine Sumy 69.63 99.51 4.26 4.36 4.16 28265
Ukraine Sievierodonetsk 69.18 59.3 62.53 50.71 81.54 5970
Ukraine Melitopol 66.84 96.77 2.67 1.78 5.33 32373
Ukraine Avdiivka 66.51 60.64 39.8 28.05 68.5 7262
Syria Raqqa 75.6 66.26 73.87 63.21 88.87 24689
Syria Aleppo 71.76 61.49 58.82 46.28 80.67 65870
Iraq Mosul 74.91 81.16 41.18 35.18 49.64 137794
All All 84.17 76.4 58.2 48.04 73.82 873072

Reciever-Operating Characteristic (ROC) curves for each country are also provided below.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pwtt-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pwtt-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file pwtt-0.1.0.tar.gz.

File metadata

  • Download URL: pwtt-0.1.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pwtt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ca41c073b92f1ee75fb181a49b05012b353670fac6dca0f8b9f152e689499d44
MD5 fbf3ffe6f7a4d4aad8192671fdf119a9
BLAKE2b-256 9714503f1dc78526d958e7963719d66cdd4b0a473613e051c1685632d19f02ae

See more details on using hashes here.

File details

Details for the file pwtt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pwtt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pwtt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f197aef772bef96b0d0a8f7ea99bf8e8ae8723e8ff23afef2184204e6dcc6fa0
MD5 814cd07a945604f38476ad95a37ca11f
BLAKE2b-256 9da0272a10c38a0ecae5e3c647397a53f5ffe2c57a2c6cc7f2dc146375789595

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page