fimeval 0.1.56__tar.gz → 0.1.58__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fimeval-0.1.56 → fimeval-0.1.58}/PKG-INFO +47 -23
- {fimeval-0.1.56 → fimeval-0.1.58}/README.md +45 -20
- {fimeval-0.1.56 → fimeval-0.1.58}/pyproject.toml +2 -3
- fimeval-0.1.58/src/fimeval/BenchFIMQuery/__init__.py +5 -0
- fimeval-0.1.58/src/fimeval/BenchFIMQuery/access_benchfim.py +824 -0
- fimeval-0.1.58/src/fimeval/BenchFIMQuery/utilis.py +334 -0
- fimeval-0.1.58/src/fimeval/BuildingFootprint/__init__.py +4 -0
- fimeval-0.1.58/src/fimeval/BuildingFootprint/arcgis_API.py +195 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/BuildingFootprint/evaluationwithBF.py +21 -63
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/ContingencyMap/__init__.py +2 -2
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/ContingencyMap/evaluationFIM.py +123 -62
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/ContingencyMap/printcontingency.py +3 -1
- fimeval-0.1.58/src/fimeval/ContingencyMap/water_bodies.py +175 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/__init__.py +10 -1
- fimeval-0.1.58/src/fimeval/setup_benchFIM.py +41 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/utilis.py +47 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval.egg-info/PKG-INFO +47 -23
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval.egg-info/SOURCES.txt +7 -2
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval.egg-info/requires.txt +1 -2
- fimeval-0.1.58/tests/test_accessbenchmarkFIM.py +53 -0
- fimeval-0.1.58/tests/test_evaluationfim.py +69 -0
- fimeval-0.1.56/src/fimeval/BuildingFootprint/__init__.py +0 -3
- fimeval-0.1.56/src/fimeval/BuildingFootprint/microsoftBF.py +0 -132
- fimeval-0.1.56/src/fimeval/ContingencyMap/PWBs3.py +0 -42
- fimeval-0.1.56/tests/test_evaluationfim.py +0 -52
- {fimeval-0.1.56 → fimeval-0.1.58}/LICENSE.txt +0 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/setup.cfg +0 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/ContingencyMap/methods.py +0 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/ContingencyMap/metrics.py +0 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval/ContingencyMap/plotevaluationmetrics.py +0 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval.egg-info/dependency_links.txt +0 -0
- {fimeval-0.1.56 → fimeval-0.1.58}/src/fimeval.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fimeval
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.58
|
|
4
4
|
Summary: A Framework for Automatic Evaluation of Flood Inundation Mapping Predictions Evaluation
|
|
5
5
|
Author: Surface Dynamics Modeling Lab
|
|
6
6
|
Author-email: Supath Dhital <sdhital@crimson.ua.edu>, Dipshika Devi <ddevi@ua.edu>
|
|
@@ -680,9 +680,8 @@ Requires-Dist: kaleido==0.2.1
|
|
|
680
680
|
Requires-Dist: nbformat<6.0.0,>=5.10.4
|
|
681
681
|
Requires-Dist: pyproj<4.0.0,>=3.7.0
|
|
682
682
|
Requires-Dist: notebook<8.0.0,>=7.3.2
|
|
683
|
-
Requires-Dist: boto3
|
|
683
|
+
Requires-Dist: boto3>=1.40.0
|
|
684
684
|
Requires-Dist: geemap
|
|
685
|
-
Requires-Dist: uv
|
|
686
685
|
Requires-Dist: seaborn
|
|
687
686
|
Provides-Extra: dev
|
|
688
687
|
Requires-Dist: pytest; extra == "dev"
|
|
@@ -712,7 +711,7 @@ To address these issues, we developed Flood Inundation Mapping Prediction Evalua
|
|
|
712
711
|
|
|
713
712
|
|
|
714
713
|
|
|
715
|
-
###
|
|
714
|
+
### Repository structure
|
|
716
715
|
<hr style="border: 1px solid black; margin: 0;">
|
|
717
716
|
|
|
718
717
|
The architecture of the ```fimeval``` integrates different modules to which helps the automation of flood evaluation. All those modules codes are in source (```src``` ) folder.
|
|
@@ -721,11 +720,15 @@ fimeval/
|
|
|
721
720
|
├── docs/ # Documentation (contains 'FIMserv' Tool usage sample codes)
|
|
722
721
|
│ └── sampledata/ # Contains the sample data to demonstrate how this frameworks works
|
|
723
722
|
│ └── fimeval_usage.ipynb #Sample code usage of the Evaluation framework
|
|
723
|
+
│ └── fimbench_usage.ipynb #Sample code usage of the FIMbench Query and getting benchmark dataset
|
|
724
724
|
├── Images/ # have sample images for documentation
|
|
725
725
|
├── src/
|
|
726
|
-
│ └── fimeval/
|
|
726
|
+
│ └── fimeval/
|
|
727
|
+
│ ├──BenchFIMQuery/ #Module to interact with the extensive FIMdatabase, hosted in AWS S3
|
|
728
|
+
│ │ └── access_benchfim.py #Different classes to query right benchmark FIM for any given location and set of filter
|
|
729
|
+
│ │ └── utilis.py #Support utility
|
|
727
730
|
│ ├──BuildingFootprint/ # Contains the evaluation of model predicted FIM with microsoft building footprint
|
|
728
|
-
│ │ └──
|
|
731
|
+
│ │ └── arcgis_API.py #seamless integration of building footprint in evaluation through ArcGIS REST API
|
|
729
732
|
│ │ └── evaluationwithBF.py
|
|
730
733
|
│ └── ContingencyMap/ # Contains all the metrics calculation and contingency map generation
|
|
731
734
|
│ │ ├── evaluationFIM.py # main evaluation moodule
|
|
@@ -733,18 +736,18 @@ fimeval/
|
|
|
733
736
|
│ │ └── metrics.py # metrics calculation module
|
|
734
737
|
│ │ └── plotevaluationmetrics.py # use to vizualize the different performance metrics
|
|
735
738
|
│ │ └── printcontingency.py # prints the contingency map to quickly generate the Map layout
|
|
736
|
-
│ │ └──
|
|
739
|
+
│ │ └── water_bodies.py # module which to get permanent water bodies from s3 bucket and ArcGIS REST API
|
|
737
740
|
│ └── utilis.py #Includes the resampling and reprojection of FIMs
|
|
738
741
|
└── tests/ # Includes test cases for different functionality
|
|
739
742
|
```
|
|
740
743
|
The graphical representation of fimeval pipeline can be summarized as follows in **```Figure 1```**. Here, it will show all the steps incorporated within the ```fimeval``` during packaging and all functionality are interconnected to each other, resulting the automation of the framework.
|
|
741
744
|
|
|
742
745
|
<div align="center">
|
|
743
|
-
<img width="
|
|
746
|
+
<img width="800" alt="image" src="./Images/flowchart.jpg">
|
|
744
747
|
</div>
|
|
745
748
|
Figure 1: Flowchart showing the entire framework pipeline.
|
|
746
749
|
|
|
747
|
-
###
|
|
750
|
+
### Framework Installation and Usage
|
|
748
751
|
<hr style="border: 1px solid black; margin: 0;">
|
|
749
752
|
|
|
750
753
|
This framework is published as a python package in PyPI (https://pypi.org/project/fimeval/).For directly using the package, the user can install this package using python package installer 'pip' and can import on their workflows:
|
|
@@ -765,7 +768,9 @@ import fimeval as fp
|
|
|
765
768
|
```
|
|
766
769
|
**Note: The framework usage provided in detailed in [Here (docs/fimeval_usage.ipynb)](./docs/fimeval_usage.ipynb)**. It has detail documentation from installation, setup, running- until results.
|
|
767
770
|
|
|
768
|
-
|
|
771
|
+
### Main Directory Structure
|
|
772
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
773
|
+
|
|
769
774
|
The main directory contains the primary folder for storing the case studies. If there is one case study, user can directly pass the case study folder as the main directory. Each case study folder must include a Benchmark FIM (B-FIM) with a 'benchmark' word assigned within the B-FIM file and different Model Predicted FIM (M-FIM)
|
|
770
775
|
in tif format.
|
|
771
776
|
For mutilple case studies,the main directory could be structure in such a way that contain the seperate folders for individual case studies.For example, if a user has two case studies they should create two seperate folders as shown in the Figure below.
|
|
@@ -780,13 +785,13 @@ main_dir = Path('./path/to/main/dir')
|
|
|
780
785
|
```
|
|
781
786
|
|
|
782
787
|
#### **Permanent Water Bodies (PWB)**
|
|
783
|
-
This framework uses PWB to first to delineate the PWB in the FIM and assign into different class so that the evaluation will be more fair. For the Contiguous United States (CONUS), the PWB is already integrated within the framework however, if user have more accurate PWB or using fimeval for outside US they can initialize and use PWB within fimeval framework. Currently it is using PWB publicly hosted by ESRI: https://hub.arcgis.com/datasets/esri::usa-detailed-water-bodies/about
|
|
788
|
+
This framework uses PWB to first to delineate the PWB in the FIM and assign into different class so that the evaluation will be more fair. For the Contiguous United States (CONUS), the PWB is already integrated within the framework however, if user have more accurate PWB or using fimeval for outside US they can initialize and use PWB within fimeval framework. Currently it is using PWB publicly hosted by ESRI through REST API: https://hub.arcgis.com/datasets/esri::usa-detailed-water-bodies/about
|
|
784
789
|
|
|
785
790
|
If user have more precise PWB, they can input their own PWB boundary as .shp and .gpkg format and need to assign the shapefile of the PWB and define directory as,
|
|
786
791
|
```bash
|
|
787
792
|
PWD_dir = Path('./path/to/PWB/vector/file')
|
|
788
793
|
```
|
|
789
|
-
####
|
|
794
|
+
#### Methods for Extracting Flood Extents
|
|
790
795
|
1. **```smallest_extent```**
|
|
791
796
|
The framework will first check all the raster extents (benchmark and FIMs). It will then determine the smallest among all the rasters. A shape file will then be created to mask all the rasters.
|
|
792
797
|
|
|
@@ -816,7 +821,7 @@ method_name = "AOI"
|
|
|
816
821
|
AOI = Path('./path/to/AOI/vectorfile')
|
|
817
822
|
```
|
|
818
823
|
|
|
819
|
-
####
|
|
824
|
+
#### Executing the Evaluation framework
|
|
820
825
|
The complete description of different modules, what they are meant for, arguments taken to run that module and what will be the end results from each is described in below **Table 1**. If user import `fimeval` framework as `fp` into workflows, they can call each module mentioned in **Table 1** as `fp.Module_Name(args)`. Here arguments in italic represents the optional field, depending upon the user requirement.
|
|
821
826
|
|
|
822
827
|
Table 1: Modules in `fimeval` are in order of execution.
|
|
@@ -825,7 +830,7 @@ Table 1: Modules in `fimeval` are in order of execution.
|
|
|
825
830
|
| `EvaluateFIM` | It runs all the evaluation of FIM between B-FIM and M-FIMs. | `main_dir`: Main directory containing the case study folders, <br> `method_name`: How users wants to evaluate their FIM, <br> `outpur_dir`: Output directory where all the results and the intermidiate files will be saved for further calculation, <br> *`PWB_dir`*: The permanenet water bodies vectory file directory if user wants to user their own boundary, <br> *`target_crs`*: this fimeval framework needs the floodmaps to be in projected CRS so define the projected CRS in epsg code format, <br> *`target_resolution`*: sometime if the benchmark is very high resolution than candidate FIMs, it needs heavy computational time, so user can define the resolution if there FIMs are in different spatial resolution, else it will use the coarser resolution among all FIMS within that case. |The outputs includes generated files in TIFF, SHP, CSV, and PNG formats, all stored within the output folder. Users can visualize the TIFF files using any geospatial platform. The TIFF files consist of the binary Benchmark-FIM (Benchmark.tif), Model-FIM (Candidate.tif), and Agreement-FIM (Contingency.tif). The shp files contain the boundary of the generated flood extent.|
|
|
826
831
|
| `PlotContingencyMap` | For better understanding, It will print the agreement maps derived in first step. | `main_dir`, `method_name`, `output_dir` : Based on the those arguments, once all the evaluation is done, it will dynamically get the corresponding contingency raster for printing.| This prints the contingency map showing different class of evaluation (TP, FP, no data, PWB etc). The outputs look like- Figure 4 first row.|
|
|
827
832
|
| `PlotEvaluationMetrics` | For quick understanding of the evaluation metrics, to plot bar of evaluation scores. | `main_dir`, `method_name`, `output_dir` : Based on the those arguments, once all the evaluation is done, it will dynamically get the corresponding file for printing based on all those info.| This prints the bar plots which includes different performance metrics calculated by EvaluateFIM module. The outputs look like- Figure 4 second row.|
|
|
828
|
-
| `EvaluationWithBuildingFootprint` | For Building Footprint Analysis, user can specify shapefile of building footprints as .shp or .gpkg format. By default it consider global Microsoft building footprint dataset
|
|
833
|
+
| `EvaluationWithBuildingFootprint` | For Building Footprint Analysis, user can specify shapefile of building footprints as .shp or .gpkg format. By default it consider global Microsoft building footprint dataset hosted in ArcGIS Online. It is seamlessly integrated within framework through ArcGIS REST API. | `main_dir`, `method_name`, `output_dir`: Those arguments are as it is, same as all other modules. <br> *`building_footprint`*: If user wants to use their own building footprint file then pass the directory here, *`shapefile_dir`*: this is the directory of user defined AOI if user is working with their own boundary and automatic Building footprint download and evaluation,| It will calculate the different metrics (e.g. TP, FP, CSI, F1, Accuracy etc) based on hit and miss of building on different M-FIM and B-FIM. Those all metrics will be saved as CSV format in `output_dir` and finally using that info it prints the counts of building foorpint in each FIMs as well as scenario on the evaluation end via bar plot.|
|
|
829
834
|
|
|
830
835
|
<p align="center">
|
|
831
836
|
<img src="./Images/methodsresults_combined.jpg" width="750" />
|
|
@@ -834,8 +839,9 @@ Table 1: Modules in `fimeval` are in order of execution.
|
|
|
834
839
|
Figure 4: Combined raw output from framework for different two method. First row (subplot a and b) and second row (subplot c and d) is contingency maps and evaluation metrics of FIM derived using `PrintContingencyMaP` and `PlotEvaluationMetrics` module. Third row (subplot e and f) is the output after processing and calculating of evaluation with BF by unsing `EvaluateWithBuildingFoorprint` module.
|
|
835
840
|
|
|
836
841
|
## Installation Instructions
|
|
842
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
837
843
|
|
|
838
|
-
|
|
844
|
+
#### 1. Prerequisites
|
|
839
845
|
|
|
840
846
|
Before installing `fimeval`, ensure the following software are installed:
|
|
841
847
|
|
|
@@ -849,13 +855,13 @@ Before installing `fimeval`, ensure the following software are installed:
|
|
|
849
855
|
|
|
850
856
|
---
|
|
851
857
|
|
|
852
|
-
|
|
858
|
+
#### 2. Install Anaconda
|
|
853
859
|
|
|
854
860
|
If Anaconda is not installed, download and install it from the [official website](https://www.anaconda.com/products/distribution).
|
|
855
861
|
|
|
856
862
|
---
|
|
857
863
|
|
|
858
|
-
|
|
864
|
+
#### 3. Set Up Virtual Environment
|
|
859
865
|
|
|
860
866
|
#### For Mac Users
|
|
861
867
|
|
|
@@ -873,25 +879,43 @@ uv pip install fimeval
|
|
|
873
879
|
```
|
|
874
880
|
|
|
875
881
|
### Google Colab Version
|
|
882
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
876
883
|
|
|
877
884
|
To use fimeval in Google Colab, follow the steps below:
|
|
878
885
|
|
|
879
|
-
|
|
886
|
+
#### Upload Files
|
|
880
887
|
Upload all necessary input files (e.g., raster, shapefiles, model outputs) to your Google Drive.
|
|
881
|
-
|
|
888
|
+
#### Open Google Colab
|
|
882
889
|
Go to Google Colab and sign in with a valid Google account.
|
|
883
|
-
|
|
890
|
+
#### Mount Google Drive
|
|
884
891
|
In a new Colab notebook, mount the Google Drive
|
|
885
892
|
```bash
|
|
886
893
|
pip install fimeval
|
|
887
894
|
```
|
|
888
|
-
###
|
|
895
|
+
### Citing our work
|
|
896
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
897
|
+
|
|
898
|
+
- Devi, D., Dipsikha, Supath Dhital, Dinuke Munasinghe, Sagy Cohen, Anupal Baruah, Yixian Chen, Dan Tian, & Carson Pruitt (2025).
|
|
899
|
+
*A framework for the evaluation of flood inundation predictions over extensive benchmark databases.*
|
|
900
|
+
**Environmental Modelling & Software**, 106786.
|
|
901
|
+
https://doi.org/10.1016/j.envsoft.2025.106786
|
|
902
|
+
|
|
903
|
+
- Cohen, S., Baruah, A., Nikrou, P., Tian, D., & Liu, H. (2025).
|
|
904
|
+
*Toward robust evaluations of flood inundation predictions using remote sensing–derived benchmark maps.*
|
|
905
|
+
**Water Resources Research**, 61(8).
|
|
906
|
+
https://doi.org/10.1029/2024WR039574
|
|
907
|
+
|
|
908
|
+
### Acknowledgements
|
|
909
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
910
|
+
|
|
889
911
|
| | |
|
|
890
912
|
| --- | --- |
|
|
891
913
|
|  | Funding for this project was provided by the National Oceanic & Atmospheric Administration (NOAA), awarded to the Cooperative Institute for Research to Operations in Hydrology (CIROH) through the NOAA Cooperative Agreement with The University of Alabama.
|
|
892
914
|
|
|
893
|
-
###
|
|
915
|
+
### For More Information
|
|
916
|
+
|
|
894
917
|
Contact <a href="https://geography.ua.edu/people/sagy-cohen/" target="_blank">Sagy Cohen</a>
|
|
895
918
|
(sagy.cohen@ua.edu)
|
|
919
|
+
Supath Dhital, (sdhital@crimson.ua.edu)
|
|
896
920
|
Dipsikha Devi, (ddevi@ua.edu)
|
|
897
|
-
|
|
921
|
+
|
|
@@ -21,7 +21,7 @@ To address these issues, we developed Flood Inundation Mapping Prediction Evalua
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
###
|
|
24
|
+
### Repository structure
|
|
25
25
|
<hr style="border: 1px solid black; margin: 0;">
|
|
26
26
|
|
|
27
27
|
The architecture of the ```fimeval``` integrates different modules to which helps the automation of flood evaluation. All those modules codes are in source (```src``` ) folder.
|
|
@@ -30,11 +30,15 @@ fimeval/
|
|
|
30
30
|
├── docs/ # Documentation (contains 'FIMserv' Tool usage sample codes)
|
|
31
31
|
│ └── sampledata/ # Contains the sample data to demonstrate how this frameworks works
|
|
32
32
|
│ └── fimeval_usage.ipynb #Sample code usage of the Evaluation framework
|
|
33
|
+
│ └── fimbench_usage.ipynb #Sample code usage of the FIMbench Query and getting benchmark dataset
|
|
33
34
|
├── Images/ # have sample images for documentation
|
|
34
35
|
├── src/
|
|
35
|
-
│ └── fimeval/
|
|
36
|
+
│ └── fimeval/
|
|
37
|
+
│ ├──BenchFIMQuery/ #Module to interact with the extensive FIMdatabase, hosted in AWS S3
|
|
38
|
+
│ │ └── access_benchfim.py #Different classes to query right benchmark FIM for any given location and set of filter
|
|
39
|
+
│ │ └── utilis.py #Support utility
|
|
36
40
|
│ ├──BuildingFootprint/ # Contains the evaluation of model predicted FIM with microsoft building footprint
|
|
37
|
-
│ │ └──
|
|
41
|
+
│ │ └── arcgis_API.py #seamless integration of building footprint in evaluation through ArcGIS REST API
|
|
38
42
|
│ │ └── evaluationwithBF.py
|
|
39
43
|
│ └── ContingencyMap/ # Contains all the metrics calculation and contingency map generation
|
|
40
44
|
│ │ ├── evaluationFIM.py # main evaluation moodule
|
|
@@ -42,18 +46,18 @@ fimeval/
|
|
|
42
46
|
│ │ └── metrics.py # metrics calculation module
|
|
43
47
|
│ │ └── plotevaluationmetrics.py # use to vizualize the different performance metrics
|
|
44
48
|
│ │ └── printcontingency.py # prints the contingency map to quickly generate the Map layout
|
|
45
|
-
│ │ └──
|
|
49
|
+
│ │ └── water_bodies.py # module which to get permanent water bodies from s3 bucket and ArcGIS REST API
|
|
46
50
|
│ └── utilis.py #Includes the resampling and reprojection of FIMs
|
|
47
51
|
└── tests/ # Includes test cases for different functionality
|
|
48
52
|
```
|
|
49
53
|
The graphical representation of fimeval pipeline can be summarized as follows in **```Figure 1```**. Here, it will show all the steps incorporated within the ```fimeval``` during packaging and all functionality are interconnected to each other, resulting the automation of the framework.
|
|
50
54
|
|
|
51
55
|
<div align="center">
|
|
52
|
-
<img width="
|
|
56
|
+
<img width="800" alt="image" src="./Images/flowchart.jpg">
|
|
53
57
|
</div>
|
|
54
58
|
Figure 1: Flowchart showing the entire framework pipeline.
|
|
55
59
|
|
|
56
|
-
###
|
|
60
|
+
### Framework Installation and Usage
|
|
57
61
|
<hr style="border: 1px solid black; margin: 0;">
|
|
58
62
|
|
|
59
63
|
This framework is published as a python package in PyPI (https://pypi.org/project/fimeval/).For directly using the package, the user can install this package using python package installer 'pip' and can import on their workflows:
|
|
@@ -74,7 +78,9 @@ import fimeval as fp
|
|
|
74
78
|
```
|
|
75
79
|
**Note: The framework usage provided in detailed in [Here (docs/fimeval_usage.ipynb)](./docs/fimeval_usage.ipynb)**. It has detail documentation from installation, setup, running- until results.
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
### Main Directory Structure
|
|
82
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
83
|
+
|
|
78
84
|
The main directory contains the primary folder for storing the case studies. If there is one case study, user can directly pass the case study folder as the main directory. Each case study folder must include a Benchmark FIM (B-FIM) with a 'benchmark' word assigned within the B-FIM file and different Model Predicted FIM (M-FIM)
|
|
79
85
|
in tif format.
|
|
80
86
|
For mutilple case studies,the main directory could be structure in such a way that contain the seperate folders for individual case studies.For example, if a user has two case studies they should create two seperate folders as shown in the Figure below.
|
|
@@ -89,13 +95,13 @@ main_dir = Path('./path/to/main/dir')
|
|
|
89
95
|
```
|
|
90
96
|
|
|
91
97
|
#### **Permanent Water Bodies (PWB)**
|
|
92
|
-
This framework uses PWB to first to delineate the PWB in the FIM and assign into different class so that the evaluation will be more fair. For the Contiguous United States (CONUS), the PWB is already integrated within the framework however, if user have more accurate PWB or using fimeval for outside US they can initialize and use PWB within fimeval framework. Currently it is using PWB publicly hosted by ESRI: https://hub.arcgis.com/datasets/esri::usa-detailed-water-bodies/about
|
|
98
|
+
This framework uses PWB to first to delineate the PWB in the FIM and assign into different class so that the evaluation will be more fair. For the Contiguous United States (CONUS), the PWB is already integrated within the framework however, if user have more accurate PWB or using fimeval for outside US they can initialize and use PWB within fimeval framework. Currently it is using PWB publicly hosted by ESRI through REST API: https://hub.arcgis.com/datasets/esri::usa-detailed-water-bodies/about
|
|
93
99
|
|
|
94
100
|
If user have more precise PWB, they can input their own PWB boundary as .shp and .gpkg format and need to assign the shapefile of the PWB and define directory as,
|
|
95
101
|
```bash
|
|
96
102
|
PWD_dir = Path('./path/to/PWB/vector/file')
|
|
97
103
|
```
|
|
98
|
-
####
|
|
104
|
+
#### Methods for Extracting Flood Extents
|
|
99
105
|
1. **```smallest_extent```**
|
|
100
106
|
The framework will first check all the raster extents (benchmark and FIMs). It will then determine the smallest among all the rasters. A shape file will then be created to mask all the rasters.
|
|
101
107
|
|
|
@@ -125,7 +131,7 @@ method_name = "AOI"
|
|
|
125
131
|
AOI = Path('./path/to/AOI/vectorfile')
|
|
126
132
|
```
|
|
127
133
|
|
|
128
|
-
####
|
|
134
|
+
#### Executing the Evaluation framework
|
|
129
135
|
The complete description of different modules, what they are meant for, arguments taken to run that module and what will be the end results from each is described in below **Table 1**. If user import `fimeval` framework as `fp` into workflows, they can call each module mentioned in **Table 1** as `fp.Module_Name(args)`. Here arguments in italic represents the optional field, depending upon the user requirement.
|
|
130
136
|
|
|
131
137
|
Table 1: Modules in `fimeval` are in order of execution.
|
|
@@ -134,7 +140,7 @@ Table 1: Modules in `fimeval` are in order of execution.
|
|
|
134
140
|
| `EvaluateFIM` | It runs all the evaluation of FIM between B-FIM and M-FIMs. | `main_dir`: Main directory containing the case study folders, <br> `method_name`: How users wants to evaluate their FIM, <br> `outpur_dir`: Output directory where all the results and the intermidiate files will be saved for further calculation, <br> *`PWB_dir`*: The permanenet water bodies vectory file directory if user wants to user their own boundary, <br> *`target_crs`*: this fimeval framework needs the floodmaps to be in projected CRS so define the projected CRS in epsg code format, <br> *`target_resolution`*: sometime if the benchmark is very high resolution than candidate FIMs, it needs heavy computational time, so user can define the resolution if there FIMs are in different spatial resolution, else it will use the coarser resolution among all FIMS within that case. |The outputs includes generated files in TIFF, SHP, CSV, and PNG formats, all stored within the output folder. Users can visualize the TIFF files using any geospatial platform. The TIFF files consist of the binary Benchmark-FIM (Benchmark.tif), Model-FIM (Candidate.tif), and Agreement-FIM (Contingency.tif). The shp files contain the boundary of the generated flood extent.|
|
|
135
141
|
| `PlotContingencyMap` | For better understanding, It will print the agreement maps derived in first step. | `main_dir`, `method_name`, `output_dir` : Based on the those arguments, once all the evaluation is done, it will dynamically get the corresponding contingency raster for printing.| This prints the contingency map showing different class of evaluation (TP, FP, no data, PWB etc). The outputs look like- Figure 4 first row.|
|
|
136
142
|
| `PlotEvaluationMetrics` | For quick understanding of the evaluation metrics, to plot bar of evaluation scores. | `main_dir`, `method_name`, `output_dir` : Based on the those arguments, once all the evaluation is done, it will dynamically get the corresponding file for printing based on all those info.| This prints the bar plots which includes different performance metrics calculated by EvaluateFIM module. The outputs look like- Figure 4 second row.|
|
|
137
|
-
| `EvaluationWithBuildingFootprint` | For Building Footprint Analysis, user can specify shapefile of building footprints as .shp or .gpkg format. By default it consider global Microsoft building footprint dataset
|
|
143
|
+
| `EvaluationWithBuildingFootprint` | For Building Footprint Analysis, user can specify shapefile of building footprints as .shp or .gpkg format. By default it consider global Microsoft building footprint dataset hosted in ArcGIS Online. It is seamlessly integrated within framework through ArcGIS REST API. | `main_dir`, `method_name`, `output_dir`: Those arguments are as it is, same as all other modules. <br> *`building_footprint`*: If user wants to use their own building footprint file then pass the directory here, *`shapefile_dir`*: this is the directory of user defined AOI if user is working with their own boundary and automatic Building footprint download and evaluation,| It will calculate the different metrics (e.g. TP, FP, CSI, F1, Accuracy etc) based on hit and miss of building on different M-FIM and B-FIM. Those all metrics will be saved as CSV format in `output_dir` and finally using that info it prints the counts of building foorpint in each FIMs as well as scenario on the evaluation end via bar plot.|
|
|
138
144
|
|
|
139
145
|
<p align="center">
|
|
140
146
|
<img src="./Images/methodsresults_combined.jpg" width="750" />
|
|
@@ -143,8 +149,9 @@ Table 1: Modules in `fimeval` are in order of execution.
|
|
|
143
149
|
Figure 4: Combined raw output from framework for different two method. First row (subplot a and b) and second row (subplot c and d) is contingency maps and evaluation metrics of FIM derived using `PrintContingencyMaP` and `PlotEvaluationMetrics` module. Third row (subplot e and f) is the output after processing and calculating of evaluation with BF by unsing `EvaluateWithBuildingFoorprint` module.
|
|
144
150
|
|
|
145
151
|
## Installation Instructions
|
|
152
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
146
153
|
|
|
147
|
-
|
|
154
|
+
#### 1. Prerequisites
|
|
148
155
|
|
|
149
156
|
Before installing `fimeval`, ensure the following software are installed:
|
|
150
157
|
|
|
@@ -158,13 +165,13 @@ Before installing `fimeval`, ensure the following software are installed:
|
|
|
158
165
|
|
|
159
166
|
---
|
|
160
167
|
|
|
161
|
-
|
|
168
|
+
#### 2. Install Anaconda
|
|
162
169
|
|
|
163
170
|
If Anaconda is not installed, download and install it from the [official website](https://www.anaconda.com/products/distribution).
|
|
164
171
|
|
|
165
172
|
---
|
|
166
173
|
|
|
167
|
-
|
|
174
|
+
#### 3. Set Up Virtual Environment
|
|
168
175
|
|
|
169
176
|
#### For Mac Users
|
|
170
177
|
|
|
@@ -182,25 +189,43 @@ uv pip install fimeval
|
|
|
182
189
|
```
|
|
183
190
|
|
|
184
191
|
### Google Colab Version
|
|
192
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
185
193
|
|
|
186
194
|
To use fimeval in Google Colab, follow the steps below:
|
|
187
195
|
|
|
188
|
-
|
|
196
|
+
#### Upload Files
|
|
189
197
|
Upload all necessary input files (e.g., raster, shapefiles, model outputs) to your Google Drive.
|
|
190
|
-
|
|
198
|
+
#### Open Google Colab
|
|
191
199
|
Go to Google Colab and sign in with a valid Google account.
|
|
192
|
-
|
|
200
|
+
#### Mount Google Drive
|
|
193
201
|
In a new Colab notebook, mount the Google Drive
|
|
194
202
|
```bash
|
|
195
203
|
pip install fimeval
|
|
196
204
|
```
|
|
197
|
-
###
|
|
205
|
+
### Citing our work
|
|
206
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
207
|
+
|
|
208
|
+
- Devi, D., Dipsikha, Supath Dhital, Dinuke Munasinghe, Sagy Cohen, Anupal Baruah, Yixian Chen, Dan Tian, & Carson Pruitt (2025).
|
|
209
|
+
*A framework for the evaluation of flood inundation predictions over extensive benchmark databases.*
|
|
210
|
+
**Environmental Modelling & Software**, 106786.
|
|
211
|
+
https://doi.org/10.1016/j.envsoft.2025.106786
|
|
212
|
+
|
|
213
|
+
- Cohen, S., Baruah, A., Nikrou, P., Tian, D., & Liu, H. (2025).
|
|
214
|
+
*Toward robust evaluations of flood inundation predictions using remote sensing–derived benchmark maps.*
|
|
215
|
+
**Water Resources Research**, 61(8).
|
|
216
|
+
https://doi.org/10.1029/2024WR039574
|
|
217
|
+
|
|
218
|
+
### Acknowledgements
|
|
219
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
220
|
+
|
|
198
221
|
| | |
|
|
199
222
|
| --- | --- |
|
|
200
223
|
|  | Funding for this project was provided by the National Oceanic & Atmospheric Administration (NOAA), awarded to the Cooperative Institute for Research to Operations in Hydrology (CIROH) through the NOAA Cooperative Agreement with The University of Alabama.
|
|
201
224
|
|
|
202
|
-
###
|
|
225
|
+
### For More Information
|
|
226
|
+
|
|
203
227
|
Contact <a href="https://geography.ua.edu/people/sagy-cohen/" target="_blank">Sagy Cohen</a>
|
|
204
228
|
(sagy.cohen@ua.edu)
|
|
229
|
+
Supath Dhital, (sdhital@crimson.ua.edu)
|
|
205
230
|
Dipsikha Devi, (ddevi@ua.edu)
|
|
206
|
-
|
|
231
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fimeval"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.58"
|
|
4
4
|
description = "A Framework for Automatic Evaluation of Flood Inundation Mapping Predictions Evaluation"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -28,9 +28,8 @@ dependencies = [
|
|
|
28
28
|
"nbformat>=5.10.4,<6.0.0",
|
|
29
29
|
"pyproj>=3.7.0,<4.0.0",
|
|
30
30
|
"notebook>=7.3.2,<8.0.0",
|
|
31
|
-
"boto3>=1.
|
|
31
|
+
"boto3>=1.40.0",
|
|
32
32
|
"geemap",
|
|
33
|
-
"uv",
|
|
34
33
|
"seaborn"
|
|
35
34
|
]
|
|
36
35
|
|