Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 2.1 KB

README.md

File metadata and controls

44 lines (35 loc) · 2.1 KB

das-anomaly

DOI Licence

A Python package for anomaly detection in distributed acoustic sensing (DAS) datasets using an autoencoder-based deep learning algorithm.

Installation

Prerequisites

  • Python >= 3.10
  • pip

Install Required Dependencies Only

It would be great to use a virtual environment or a fresh conda environment for better dependency management. To install the package in editable mode with the required dependencies, run the following when you are in the das-anomaly directory:

pip install -e .

Install All Dependencies

To install the package in editable mode with all optional dependencies, run:

pip install -e '.[all]'

How to Use the Package?

The main steps are as follows:

  1. Using the plot_psd scripts, create power spectral density (PSD) plots in RGB format. We average the energy over a desired time window and stack all channels together to create a PSD with channels on the X-axis and frequency on the Y-axis. We create PSD of normal images (images without any anomaly or seismic event) and known seismic events. We can use MPI to distribute plotting PSDs over CPUs.
  2. Using the train_model scripts, randomly select train and test PSD images and train the model on normal PSD images.
  3. Using the validate_and_plot_density jupyter notebook, validate the trained model and find an appropriate density score as a threshold for anomaly detection.
  4. Using the detect_anomalies scripts, detect anomalies in PSD images with the trained model and write their information.
  5. Using the count_anomalies scripts, count the number of detected anomalies.

Package's dependencies

Optional:

Contact

Ahmad Tourei, Colorado School of Mines tourei@mines.edu | ahmadtourei@gmail.com