Skip to main content

A deep learning model that can recognize and mask significant deformation events in InSAR interferograms.

Project description

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. View the documentation here.

Table of Contents

Installation

pip

pip install insar-eventnet

From source

Clone the repository

git clone https://github.com/asfadmin/AI-Event-Monitoring.git

Activate the conda environment from the environment.yaml file

conda create env -f environment.yaml
conda activate insar-eventnet

then, install the insar-eventnet package and cli

pip install .

Setup

Run the setup command in your desired working directory

insar-eventnet 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.

Command line interface

There are two command line interfaces, inference.py which utilizes the cloud API for inference, and insar-eventnet which runs the models locally.

inference.py

Running inference

python inference predict-event [usgs-event-id] [product-name]

aievents.py

For a List of Commands

insar-eventnet --help

For Detailed Usage Information

insar-eventnet [command] --help

Viewing a Random Synthetic Masked/Wrapped Pair

insar-eventnet show-random

Viewing a Random Simulated Masked/Wrapped Pair

insar-eventnet simulate

Creating a Synthetic Masked/Wrapped Dataset

insar-eventnet make-synthetic-dataset [dataset-name] [dataset-size] --tile_size [nxn-size-of-images]

Creating a Simulated Masked/Wrapped Dataset

insar-eventnet make-simulated-dataset [dataset-name] [dataset-size] --tile_size [nxn-size-of-images]

Viewing a Pair from a Dataset

insar-eventnet show [path/to/dataset.npz]

Training a Model

insar-eventnet train-model [model-name] [path/to/training-set] [path/to/testing-set] --epochs [num-of-epochs]

Testing a Model

insar-eventnet test-model [path/to/model]

Mask a Real Interferogram

insar-eventnet 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

insar-eventnet-0.1.0.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

insar_eventnet-0.1.0-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

Details for the file insar-eventnet-0.1.0.tar.gz.

File metadata

  • Download URL: insar-eventnet-0.1.0.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for insar-eventnet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83d51bf401cc4b59413fe0bdc5fe729aa224d9f91e14fd16aea7d6ea118c6e41
MD5 fca250659ce5f20bdf0a2051562b7f74
BLAKE2b-256 452f31482a5fd91fb7029b817d2023a2aed79482da0aa9741e4618768624ee9c

See more details on using hashes here.

File details

Details for the file insar_eventnet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: insar_eventnet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for insar_eventnet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e21db62682b45c01f79b7dafa8e1f2891cd9fa450636b50241dcd8aedc7dc1c6
MD5 7355ab87e20f3aab91bda9ea96672d47
BLAKE2b-256 92a7c1a73281ec3de2ec1159bee94c9f580ac1acd627169f036e9f6f2987fde0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page