File size: 3,852 Bytes
adbc22d
 
5d59930
 
 
 
 
 
 
 
 
 
 
 
 
adbc22d
5d59930
71448e2
5d59930
 
 
 
 
 
 
 
 
 
 
 
 
 
71448e2
5d59930
0f3e803
5d59930
 
 
1781e1e
71448e2
 
5d59930
 
b7100cd
dac3258
5d59930
 
 
 
 
 
382ff2f
 
 
5d59930
 
b7100cd
 
 
 
 
 
 
 
382ff2f
 
 
b7100cd
382ff2f
b7100cd
 
5d59930
7e45076
 
 
 
 
9192257
 
 
 
 
 
68f0236
9192257
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
license: apache-2.0
language:
- en
tags:
- Pytorch
- mmsegmentation
- segmentation
- Flood mapping
- Sentinel-2
- Geospatial
- Foundation model
metrics:
- accuracy
- IoU
---
### Model and Inputs
The pretrained [Prithvi-100m](https://huggingface.co/ibm-nasa-geospatial/Prithvi-100M/blob/main/README.md) model is finetuned to segment the extend of floods on Sentinel-2 images from the [Sen1Floods11 dataset](https://github.com/cloudtostreet/Sen1Floods11). 

The dataset consists of 446 labeled 512x512 chips that span all 14 biomes, 357 ecoregions, and 6 continents of the world across 11 flood events. The benchmark associated to Sen1Floods11 provides results for fully convolutional neural networks trained in various input/labeled data setups, considering Sentinel-1 and Sentinel-2 imagery. 

We extract the following bands for flood mapping:
 
1. Blue
2. Green
3. Red
4. Narrow NIR
5. SWIR 1
6. SWIR 2

Labels represent no water (class 0), water/flood (class 1), and no data/clouds (class 2).

The Prithvi-100m model was initially pretrained using a sequence length of 3 timesteps. Based on the characteristics of this benchmark dataset, we focus on single-timestamp segmentation. This demonstrates that our model can be utilized with an arbitrary number of timestamps during finetuning.

![](sen1floods11-finetuning.png)

### Code

The code for this finetuning is available through [github](https://github.com/NASA-IMPACT/hls-foundation-os/).

The configuration used for finetuning is available through this [config](https://github.com/NASA-IMPACT/hls-foundation-os/blob/main/fine-tuning-examples/configs/sen1floods11.py).

### Results

Finetuning the geospatial foundation model for 100 epochs leads to the following performance on the test dataset:

|     **Classes**    | **IoU**| **Acc**|
|:------------------:|:------:|:------:|
|      No water      | 96.90% | 98.11% |
|     Water/Flood    | 80.46% | 90.54% |

|     **aAcc**       |**mIoU**|**mAcc**|
|:------------------:|:------:|:------:|
|       97.25%       | 88.68% | 94.37% |


The performance of the model has been further validated on an unseen, holdout flood event in Bolivia. The results are consistent with the performance on the test set:


|     **Classes**    | **IoU**| **Acc**|
|:------------------:|:------:|:------:|
|      No water      | 95.37% | 97.39% |
|     Water/Flood    | 77.95% | 88.74% |

|     **aAcc**       |**mIoU**|**mAcc**|
|:------------------:|:------:|:------:|
|       96.02%       | 86.66% | 93.07% |

Finetuning took ~1 hour on an NVIDIA V100.


### Inference
The github repo includes an inference script that allows running the flood mapping model for inference on Sentinel-2 images. These inputs have to be geotiff format, including 6 bands for a single time-step described above (Blue, Green, Red, Narrow NIR, SWIR, SWIR 2) in order. There is also a **demo** that leverages the same code **[here](https://huggingface.co/spaces/ibm-nasa-geospatial/Prithvi-100M-sen1floods11-demo)**.

### Feedback

Your feedback is invaluable to us. If you have any feedback about the model, please feel free to share it with us. You can do this by submitting issues on our open-source repository, [hls-foundation-os](https://github.com/NASA-IMPACT/hls-foundation-os/issues), on GitHub.

### Citation

If this model helped your research, please cite our model in your publications. Here is an example BibTeX entry:

```
@misc{Prithvi-100M-flood-mapping,
    author          = {Jakubik, Johannes and Fraccaro, Paolo and Oliveira Borges, Dario and Muszynski, Michal and Weldemariam, Kommy and Zadrozny, Bianca and Ganti, Raghu and Mukkavilli, Karthik},
    month           = aug,
    title           = {{Prithvi 100M flood mapping}},
    repository-code = {https://huggingface.co/ibm-nasa-geospatial/Prithvi-100M-sen1floods11},
    year            = {2023}
}
```