Package: seisbench
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 startedSeisBench offers three core modules,data,models, andgenerate.dataprovides access to benchmark datasets and offers functionality for loading datasets.modelsoffers a collection of machine learning models for seismology.
You can easily create models, load pretrained models or train models on any dataset.generatecontains tools for building data generation pipelines.
They bridge the gap betweendataandmodels.The easiest way of getting started is through our colab notebooks.ExamplesDataset basicsModel APIGenerator PipelinesApplied pickingUsing DeepDenoiserDepth phases and earthquake depthTraining PhaseNet (advanced)Creating a dataset (advanced)Building an event catalog with GaMMA (advanced)Building an event catalog with PyOcto (advanced)Alternatively, you can clone the repository and run the sameexampleslocally.For more detailed information on Seisbench check out theSeisBench documentation.InstallationSeisBench can be installed in two ways.
In both cases, you might consider installing SeisBench in a virtual environment, for example usingconda.The recommended way is installation through pip.
Simply run:pip install seisbenchSeisBench is build on pytorch.
As of pytorch 1.13.0, pytorch is by default shipped with CUDA dependencies which increases the size of the installation considerably.
If you want to install a pure CPU version, the easiest workaround for now is to use:pip install torch==1.12.1 seisbenchWe are working on amore permanent solutionthat allows to use the latest pytorch version in a pure CPU context.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.ContributingThere are many ways to contribute to SeisBench and we are always looking forward to your contributions.
Check out thecontribution guidelinesfor details on how to contribute.Known issuesSome institutions and internet providers are blocking access to our data and model repository, as it is running on a non-standard port (2880).
This usually manifests in timeouts when trying to download data or model weights.
To verify the issue, try accessinghttps://hifis-storage.desy.de:2880/directly from the same machine.
As a mitigation, you can use our backup repository. Just runseisbench.use_backup_repository().
Please note that the backup repository will usually show lower download speeds.
We recommend contacting your network administrator to allow outgoing access to TCP port 2880 on our server as a higher performance solution.We've recently changed the URL of the SeisBench repository. To use the new URL update to SeisBench 0.4.1.
It this is not possible, you can use the following commands within your runtime to update the URL manually:importseisbenchfromurllib.parseimporturljoinseisbench.remote_root="https://hifis-storage.desy.de:2880/Helmholtz/HelmholtzAI/SeisBench/"seisbench.remote_data_root=urljoin(seisbench.remote_root,"datasets/")seisbench.remote_model_root=urljoin(seisbench.remote_root,"models/v3/")On the Apple M1 and M2 chips, pytorch seems to not always work when installed directly withinpip install seisbench.
As a workaround, follow the instructions at (https://pytorch.org/) to install pytorch and then install SeisBench as usual through pip.EQTransformer model weights "original" in version 1 and 2 are incompatible with SeisBench >=0.2.3. Simply usefrom_pretrained("original", version="3")orfrom_pretrained("original", update=True). The weights will not differ in their predictions.ReferencesReference publications for SeisBench:SeisBench - A Toolbox for Machine Learning in SeismologyReference publication for software.Which picker fits my data? A quantitative evaluation of deep learning based seismic pickersExample of in-depth bencharking study of deep learning-based picking routines using the SeisBench framework.AcknowledgementThe initial version of SeisBench has been developed atGFZ PotsdamandKITwith funding fromHelmholtz AI.
The SeisBench repository is hosted byHIFIS - Helmholtz Federated IT Services.