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
Model API
Generator Pipelines
Advanced topics
This section covers topics like training models, creating datasets or building earthquake catalogs.
Examples
Applied picking
Training PhaseNet
Creating a dataset
Picking first motion polarities
Building an event catalog with GaMMA
Building an event catalog with PyOcto
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
Training DeepSubDAS
Miscellaneous
A collection of notebooks for miscellaneous topics, such as denoising or depth estimation.
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:
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:
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.