Skip to content

Commit 607a27e

Browse files
update the building deviation ratio
1 parent 5c33c1a commit 607a27e

File tree

6 files changed

+7
-1
lines changed

6 files changed

+7
-1
lines changed
34.6 KB
Binary file not shown.

dist/fimeval-0.1.50.tar.gz

35.2 KB
Binary file not shown.
34.6 KB
Binary file not shown.

dist/fimeval-0.1.51.tar.gz

35.2 KB
Binary file not shown.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fimeval"
3-
version = "0.1.49"
3+
version = "0.1.51"
44
description = "A Framework for Automatic Evaluation of Flood Inundation Mapping Predictions Evaluation"
55
authors = [
66
"Surface Dynamics Modeling Lab",

src/fimeval/BuildingFootprint/evaluationwithBF.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def count_centroids_in_raster(raster_path, label):
8585
if "bm" in str(raster1_path).lower():
8686
count_centroids_in_raster(raster1_path, "Benchmark")
8787
count_centroids_in_raster(raster2_path, "Candidate")
88+
8889
elif "candidate" in str(raster2_path).lower():
8990
count_centroids_in_raster(raster1_path, "Candidate")
9091
count_centroids_in_raster(raster2_path, "Benchmark")
@@ -105,6 +106,9 @@ def count_centroids_in_raster(raster_path, label):
105106
CSI = TP / (TP + FP + FN) if (TP + FP + FN) > 0 else 0
106107
FAR = FP / (TP + FP) if (TP + FP) > 0 else 0
107108
POD = TP / (TP + FN) if (TP + FN) > 0 else 0
109+
110+
111+
BDR = (centroid_counts["Candidate"]- centroid_counts["Benchmark"])/centroid_counts["Benchmark"]
108112

109113
counts_data = {
110114
"Category": [
@@ -116,6 +120,7 @@ def count_centroids_in_raster(raster_path, label):
116120
"CSI",
117121
"FAR",
118122
"POD",
123+
"Building Deviation Ratio",
119124
],
120125
"Building Count": [
121126
centroid_counts["Candidate"],
@@ -126,6 +131,7 @@ def count_centroids_in_raster(raster_path, label):
126131
f"{CSI:.3f}",
127132
f"{FAR:.3f}",
128133
f"{POD:.3f}",
134+
f"{BDR:.3f}",
129135
],
130136
}
131137

0 commit comments

Comments
 (0)