Giter VIP home page Giter VIP logo

sar2et's Introduction

SAR2ET

Introduction

We developed multiple SAR2ET models that are trained with different combinations of various static (topographical and soil texture data) and dynamic (meteorological data and soil moisture) data along with the SAR. These secondary data sources were incorporated during the SAR2ET model training and had a significant impact on improving ET estimation performance when combined with SAR. The resulting SAR2ET approach is summarized as an illustration in the figure below.

Getting Started

Please follow the steps below to install and run the best-performing SAR2ET model.

System requirements

SAR2ET models are built and tested on a Ubuntu 20.04 environment with a single GPU of NVIDIA GeForce RTX 3090 Ti on the CUDA 12.0 platform using PyTorch 2.0.1.

Installation

  1. Clone the repository to your local.
git clone https://github.com/cetinsamet/sar-based-et-estimation.git
  1. Build the conda environment from yml and activate the environment.
# move to the main directory
cd sar-based-et-estimation

# create conda environment from the file
conda env create -f environment.yml

# activate conda environment
conda activate et-estimation
  1. Retrieve the pre-trained model weights file and place it under models/ directory.

Run

To run the best-performing SAR2ET model (trained with SAR, ERA5, and DEM), simply call the predict_et.py by providing the file path to the pre-trained model weights, file paths to the model input tensors (SAR, ERA5, and DEM tensors) and the type of device (cpu/cuda) to run the model as script arguments.

python predict_et.py \
    --pretrained_model=<path-to-pretrained-model-weights> \
    --s1_tensor=<path-to-S1-tensor> \
    --era5_tensor=<path-to-ERA5-tensor> \
    --dem_tensor=<path-to-DEM-tensor> \
    --device=<device-to-use-for-inference>

Some test examples from the dataset are placed under data/tensors/ directory. data/images/ directory also contains corresponding visualizations of these test examples. An example run using these data examples would be:

python predict_et.py \
    --pretrained_model WORKDIR/sar-based-et-estimation/models/et-estimator.pt \
    --s1_tensor WORKDIR/sar-based-et-estimation/data/tensors/s1/s1_0008.pt \
    --era5_tensor WORKDIR/sar-based-et-estimation/data/tensors/era5/era5_0008.pt \
    --dem_tensor WORKDIR/sar-based-et-estimation/data/tensors/dem/dem_0008.pt \
    --device cuda

After the execution of the example above, two outputs are expected to be saved; (1) an et_pred.pt file containing the tensor representation of the predicted ET, with a shape (1, 1, 128, 128), for the provided pre-trained model and input tensors, and (2) an et_pred.png file that represents the visualization of the predicted ET patch.

For a simple, interactive, and end-to-end example of the inference procedure of the best-performing SAR2ET model, please see the Jupyter notebook example placed under src/example directory.

Results

We thoroughly evaluate various SAR2ET models that estimate ET using different combinations of static and dynamic data sources. We analyze seasonal and regional differences by evaluating these models across different study areas to identify any regional disparities and analyze R2 scores on a monthly basis for the year 2021. We use tables to provide a detailed comparison of the models, highlighting their strengths and weaknesses, and showing the impact of different data sources on ET estimation accuracy. We also provide qualitative results to further examine the models’ performance.

Quantitative results

Table 2 shows the performance metrics of various SAR2ET models that are trained using different combinations of static and dynamic data sources, on the test set. The baseline SAR model achieves an MSE of 0.94, an MAE of 0.72, and a R2 of 0.63. However, as auxiliary static and dynamic data sources are added to the models, their performance further improves. The best model in this comparison incorporates SAR, ERA5, and DEM data, achieving an outstanding MSE of 0.46, an MAE of 0.49, and a R2 of 0.82 (a 19-point improvement over the baseline). This underscores the synergistic benefits of combining both static and dynamic data sources and emphasizes the importance of integrating SAR, DEM, and ERA5 data to enhance the accuracy of SAR2ET models for estimating ET.

Table 3 provides a detailed comparison of multiple SAR2ET models, each trained with a combination of static and dynamic data sources, for the purpose of estimating ET over the course of the study year 2021. The primary focus of this analysis is the variation in R2 scores across different time intervals (months of the year), shedding light on the models’ performance throughout the year. The baseline SAR model starts with relatively lower R2 values in March (0.37) and April (0.31) but gradually improves its performance as the year progresses, achieving its highest R2 scores in July (0.63) and August (0.68). As additional data sources are incorporated into the models, the R2 scores generally show improvement across all months. The model trained with SAR, ERA5, and DEM data consistently outperforms others, with the highest R2 scores across all months, notably achieving a remarkable R2 of 0.85 in August. This demonstrates that combining SAR with dynamic (meteorological) and static (topographical) data significantly enhances the model’s ability to estimate ET throughout the year. Overall, the table illustrates the importance of data integration in SAR2ET modeling and highlights how the accuracy of ET estimation varies by month, with SAR-based models becoming more effective in capturing ET dynamics during the warmer months of the year when water-related processes are more active.

Table 4 demonstrates notable improvements in the overall performance of SAR2ET models across various geographic regions. Initially, the SAR model exhibits moderate accuracy in estimating ET, with R2 scores ranging from 0.56 to 0.71 across different regions. However, as additional static data sources such as SoilGrids and DEM are integrated into the models, a consistent enhancement in R2 scores is evident. The most remarkable performance improvement is observed in the model trained with SAR, ERA5, and DEM data, where R2 scores reach their maximum when both the most significant static (DEM) and dynamic (ERA5) data sources are present. In areas like the Balkans (B) and Central Anatolia (CA), this model has shown remarkable R2 values of up to 0.86 and 0.83, respectively. These values represent a significant improvement of 15 and 21 points over the baseline and indicate a robust correlation between model predictions and observed ET data. These findings emphasize the importance of combining topographical data (DEM) and meteorological data (ERA5) in SAR-based ET estimation, especially in areas where these variables significantly influence ET dynamics.

Qualitative results

The below figures illustrate the comparison between ground truth ET and predicted ETs made by different SAR-based ET estimations. The figures suggest that the SAR2ET model, which harnesses the synergy of meteorological data, topographical features, and SAR, emerges as the most robust and accurate predictor of ET. This combined approach allows the model to effectively capture micro-seasonal weather patterns and local topographical structures. Consequently, it consistently delivers ET predictions that closely align with the target values.

Acknowledgements

This project entitled ”Improving Resiliency of Malian Farmers with Yield Estimation: IMPRESSYIELD” was funded by the Climate Change AI Innovation Grants program, hosted by Climate Change AI with the additional support of the Canada Hub of Future Earth.

======= # Impressyield A joint participation project led by Agcurate in collaboration with Middle East Technical University and Istanbul Technical University, funded by CCAI.

sar2et's People

Contributors

cetinsamet avatar brkulkr avatar 0xmtn avatar

Stargazers

EL HACHIMI CHOUAIB avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.