Skip to content

AndrewPlayer3/AI-Event-Monitoring

 
 

Repository files navigation

AI-Event-Monitoring

The goal of this project is to create a deep learning model that can recognize and mask significant deformation events in InSAR interferograms.

Table of Content

Setup

This project uses poetry for dependency management.
First, install poetry and then run these commands:

poetry install
poetry shell

Once you are in the poetry virtual environment, you can run the setup command:

python aievents.py setup

This will add the data directory which is structured like this:

data/
      └──input/
        └──products/
        └──aoi/
      └──working/
        └──real/
        └──synthetic/
      └──output/
        └──models/
        └──mask/
        └──tensorboard/

You should now be ready to run everything.

Basic Commands

For a List of Commands

python aievents.py --help

For Detailed Usage Information

python aievents.py [command] --help

Viewing a Random Synthetic Masked/Wrapped Pair

python aievents.py show-random

Viewing a Random Simulated Masked/Wrapped Pair

python aievents.py simulate

Creating a Synthetic Masked/Wrapped Dataset

python aievents.py make-synthetic-dataset [dataset-name] [dataset-size] --tile_size [nxn-size-of-images]

Creating a Simulated Masked/Wrapped Dataset

python aievents.py make-simulated-dataset [dataset-name] [dataset-size] --tile_size [nxn-size-of-images]

Viewing a Pair from a Dataset

python aievents.py show [path/to/dataset.npz]

Training a Model

python aievents.py train-model [model-name] [path/to/training-set] [path/to/testing-set] --epochs [num-of-epochs]

Testing a Model

python aievents.py test-model [path/to/model]

Mask a Real Interferogram

python aievents.py mask [path/to/model] [path/to/product_folder] --tile_size [size-of-tiles-used-to-train]

Running Unit Tests

Currently, test coverage is limited. However, they can be run with pytest by simply typing:

pytest

in the root of the project directory.

Synthetic Interferograms

Synthetic Interferograms are generated using more simple math than the simulated ones. This means that the datasets can be created more quickly; although, the simulated interferogram generation is still fairly quick and recommended over this.

Synthetic Masked/Wrapped Pair Example

synth_example

Simulated Interferograms

Simulated Interferograms are comprised of simulated deformation using Okada's model, simulated turbulent atmospheric error using a FFT method, simulated topographic atmospheric error, and simulated incoherence from turbulent atmospheric error. Most of the functions related to the simulation come from this project by Matthew Gaddes which was used for this 2019 JGR:SE paper.

Simulated Masked/Wrapped Pair Example

sim_example

Simulated Masked/Wrapped Pair Example (Atmospheric Phase Error only)

git_topo_example

Basic Model's Mask Examples

These results come from a basic model trained on a simulated dataset with 1000 samples, 900 for training and 100 for validation.

An Earthquake in Iran

git_result1

A Negative from the Coast of Greenland

7thSimNegative

References

Gaddes, M. E., Hooper, A., & Bagnardi, M. (2019). Using machine learning to automatically detect volcanic unrest in a time series of interferograms. Journal of Geophysical Research: Solid Earth, 124, 12304– 12322. https://doi.org/10.1029/2019JB017519

About

To detect natural disasters from SAR interferograms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 97.6%
  • Python 2.4%