You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ fimeval/
34
34
├── src/
35
35
│ └── fimeval/
36
36
│ ├──BuildingFootprint/ # Contains the evaluation of model predicted FIM with microsoft building footprint
37
+
│ │ └── microsoftBF.py
37
38
│ │ └── evaluationwithBF.py
38
39
│ └── ContingencyMap/ # Contains all the metrics calculation and contingency map generation
39
40
│ │ ├── evaluationFIM.py # main evaluation moodule
@@ -59,7 +60,8 @@ This framework is published as a python package in PyPI (https://pypi.org/projec
59
60
60
61
```bash
61
62
#Install to use this framework
62
-
pip install fimeval
63
+
pip install uv #Makes the downloading much faster
64
+
uv pip install fimeval
63
65
64
66
#Use this framework in your workflows using poetry
65
67
poetry add fimeval
@@ -132,17 +134,17 @@ Table 1: Modules in `fimeval` are in order of execution.
132
134
| `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.|
133
135
|`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.|
134
136
|`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.|
135
-
| `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. Those data are hosted in Google Earth Engine (GEE) so, It pops up to authenticate the GEE account, please allow it and it will download the data based on evaluation boundary and evaluation is done. | `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, *`country`*: It is the 3 letter based country ISO code (eg. 'USA', NEP' etc), for the building data automation using GEE based on the evaluation extent, *`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.|
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. Those data are hosted in Google Earth Engine (GEE) so, It pops up to authenticate the GEE account, please allow it and it will download the data based on evaluation boundary and evaluation is done. | `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, *`country`*: It is the 3 letter based country ISO code (eg. 'USA', NEP' etc), for the building data automation using GEE based on the evaluation extent, *`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, *`geeprojectID`*: this is the google earth engine google cloud project ID, which helps to access the GEE data and resources to work with building footprint download and process. | 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.|
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.
142
144
143
-
## 🔧 Installation Instructions
145
+
## Installation Instructions
144
146
145
-
### 1. ✅ Prerequisites
147
+
### 1. Prerequisites
146
148
147
149
Before installing `fimeval`, ensure the following software are installed:
148
150
@@ -162,28 +164,24 @@ If Anaconda is not installed, download and install it from the [official website
162
164
163
165
---
164
166
165
-
### 3. 🌐 Set Up Virtual Environment
167
+
### 3. Set Up Virtual Environment
166
168
167
-
#### 💻 For Mac Users
169
+
#### For Mac Users
168
170
169
171
Open **Terminal** and run:
170
172
```bash
171
-
172
173
# Create a new environment named 'fimeval'
173
174
conda create --name fimeval python=3.10
174
175
175
176
# Activate the environment
176
177
conda activate fimeval
177
178
178
-
# Install Jupyter Notebook
179
-
pip install notebook
180
-
181
179
# Install fimeval package
182
-
pip install fimeval
183
-
180
+
pip install uv
181
+
uv pip install fimeval
184
182
```
185
183
186
-
### ☁️ Google Colab Version
184
+
### Google Colab Version
187
185
188
186
To use fimeval in Google Colab, follow the steps below:
189
187
@@ -196,7 +194,6 @@ In a new Colab notebook, mount the Google Drive
0 commit comments