Go to file
2023-08-29 09:59:31 +02:00
experiments initial commit with the pipeline for training and evaluating seisbench models 2023-08-29 09:59:31 +02:00
notebooks initial commit 2023-07-05 09:58:06 +02:00
scripts initial commit with the pipeline for training and evaluating seisbench models 2023-08-29 09:59:31 +02:00
utils initial commit 2023-07-05 09:58:06 +02:00
.gitignore initial commit with the pipeline for training and evaluating seisbench models 2023-08-29 09:59:31 +02:00
config.json initial commit with the pipeline for training and evaluating seisbench models 2023-08-29 09:59:31 +02:00
poetry.lock initial commit with the pipeline for training and evaluating seisbench models 2023-08-29 09:59:31 +02:00
pyproject.toml initial commit with the pipeline for training and evaluating seisbench models 2023-08-29 09:59:31 +02:00
README.md initial commit with the pipeline for training and evaluating seisbench models 2023-08-29 09:59:31 +02:00

Demo notebooks and scripts for EPOS AI Platform

This repo contains notebooks and scripts demonstrating how to:

  • Prepare IGF data for training a seisbench model detecting P phase (i.e. transform mseeds into SeisBench data format), check the notebook.

  • Explore available data, check the notebook

  • Train various cnn models available in seisbench library and compare their performance of detecting P phase, check the script

  • [to update] Validate model performance, check the notebook

  • [to update] Use model for detecting P phase, check the notebook

Acknowledgments

This code is based on the pick-benchmark, the repository accompanying the paper: Which picker fits my data? A quantitative evaluation of deep learning based seismic pickers

Usage

  1. Install all dependencies with poetry, run:

    poetry install

  2. Prepare .env file with content:

    WANDB_HOST="https://epos-ai.grid.cyfronet.pl/"
    WANDB_API_KEY="your key"
    WANDB_USER="your user"
    WANDB_PROJECT="training_seisbench_models_on_igf_data"
    BENCHMARK_DEFAULT_WORKER=2
    
    
  3. Transform data into seisbench format.

    • Download original data from the drive
    • Run the notebook: utils/Transforming mseeds to SeisBench dataset.ipynb
  4. Initialize poetry environment:

    poetry shell

  5. Run the pipeline script:

    python pipeline.py

    The script performs the following steps:

    • Generates evaluation targets
      • Trains multiple versions of GPD, PhaseNet and ... models to find the best hyperparameters, producing the lowest validation loss. This step utilizes the Weights & Biases platform to perform the hyperparameters search (called sweeping) and track the training process and store the results. The results are available at
        https://epos-ai.grid.cyfronet.pl/<your user name>/<your project name>
    • Uses the best performing model of each type to generate predictions
    • Evaluates the performance of each model by comparing the predictions with the evaluation targets
    • Saves the results in the scripts/pred directory

    The default settings are saved in config.json file. To change the settings, edit the config.json file or pass the new settings as arguments to the script. For example, to change the sweep configuration file for GPD model, run: python pipeline.py --gpd_config <new config file> The new config file should be placed in the experiments or as specified in the configs_path parameter in the config.json file.

Troubleshooting