Skip to content

Repository files navigation


PyPI - License GitHub Workflow Status Read the Docs PyPI Python 3.10 DOI

The Seismology Benchmark collection (SeisBench) is an open-source python toolbox for machine learning in seismology. It provides a unified API for accessing seismic datasets and both training and applying machine learning algorithms to seismic data. SeisBench has been built to reduce the overhead when applying or developing machine learning techniques for seismological tasks.

Getting started

SeisBench offers three core modules, data, models, and generate. data provides access to benchmark datasets and offers functionality for loading datasets. models offers a collection of machine learning models for seismology. You can easily create models, load pretrained models or train models on any dataset. generate contains tools for building data generation pipelines. They bridge the gap between data and models.

The easiest way of getting started is through our Colab notebooks. Just click on the "Open in Colab" link to run them in your browser. Alternatively, you can clone the repository and run the same examples locally.

Note: If an example notebooks has been added very recently, it might rely on functionality that is not yet part of a numbered version. To run it nonetheless, you can replace the installation line with pip install "seisbench[das] @ git+https://github.com/seisbench/seisbench" to use the latest development branch.

Basic examples

These examples introduce you to the key modules of SeisBench.

Examples
Dataset basics Open In Colab
Model API Open In Colab
Generator Pipelines Open In Colab

Advanced topics

This section covers topics like training models, creating datasets or building earthquake catalogs.

Examples
Applied picking Open In Colab
Training PhaseNet Open In Colab
Creating a dataset Open In Colab
Building an event catalog with GaMMA Open In Colab
Building an event catalog with PyOcto Open In Colab

Using SeisBench for DAS data

These tutorials introduce how to use SeisBench to train and apply models for distributed acoustic sensing (DAS) data.

Examples
Applying DAS models Open In Colab
Training DeepSubDAS Open In Colab

Miscellaneous

A collection of notebooks for miscellaneous topics, such as denoising or depth estimation.

Examples
Training DKPN Open In Colab
Using DeepDenoiser Open In Colab
Training Denoiser Open In Colab
Depth phases and earthquake depth Open In Colab

For more detailed information on Seisbench check out the SeisBench documentation.

Installation

SeisBench can be installed in two ways. In both cases, you might consider installing SeisBench in a virtual environment, for example using conda.

The recommended way is installation through pip. Simply run:

pip install seisbench

Alternatively, you can install the latest version from source. For this approach, clone the repository, switch to the repository root and run:

pip install .

which will install SeisBench in your current python environment.

If you want to run SeisBench on DAS data, make sure to pass the [das] argument, i.e., pip install seisbench[das].

CPU only installation

SeisBench is built on pytorch, which in turn runs on CUDA for GPU acceleration. Sometimes, it might be preferable to install pytorch without CUDA, for example, because CUDA will not be used and the CUDA binaries are rather large. To install such a pure CPU version, the easiest way is to follow a two-step installation. First, install pytorch in a pure CPU version as explained here. Second, install SeisBench the regular way through pip. Example instructions would be:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install seisbench

Contributing

There are many ways to contribute to SeisBench and we are always looking forward to your contributions. Check out the contribution guidelines for details on how to contribute.

Known issues

  • We've experienced occasional issues with access to our repository. To verify the issue, try accessing https://hifis-storage.desy.de directly from the same machine. As a mitigation, you can use our backup repository. Just run seisbench.use_backup_repository(). Please note that the backup repository will usually show lower download speeds.
  • We've recently changed the URL of the SeisBench repository. To use the new URL update to SeisBench 0.11.5. It this is not possible, you can use the following commands within your runtime to update the URL manually:
    import seisbench
    from urllib.parse import urljoin
    
    seisbench.remote_root = "https://hifis-storage.desy.de/Helmholtz/HelmholtzAI/SeisBench/"
    seisbench.remote_data_root = urljoin(seisbench.remote_root, "datasets/")
    seisbench.remote_model_root = urljoin(seisbench.remote_root, "models/v3/")

References

Reference publications for SeisBench:




Acknowledgements

The initial version of SeisBench has been developed at GFZ Potsdam and KIT with funding from Helmholtz AI. The SeisBench repository is hosted by HIFIS - Helmholtz Federated IT Services.

This development of the LFE detection model has been supported by MIAI@Grenoble Alpes (ANR-19-P3IA-0003) and the European Union through the Marie Skłodowska-Curie Actions (n°101104996 - DECODE).

The initial DAS model and data interface was supported by the European Commission under the Horizon Europe programme, through the project SUBMERSE (https://submerse.eu/) (Grant Agreement No. 101095055), funded within the HORIZON-INFRA-2022-TECH-01 call.

About

SeisBench - A toolbox for machine learning in seismology

Topics

Resources

Code of conduct

Contributing

Stars

415 stars

Watchers

25 watching

Forks

Releases

Packages

Used by

Contributors

Languages