Skip to content
/ LNRL Public

Label Noise-Robust Learning for Microseismic Arrival Time Picking

License

Notifications You must be signed in to change notification settings

senli1073/LNRL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License LastCommit

Architecture

Introduction

Label Noise-Robust Learning (LNRL) approach was designed for handling label noise in microseismic tasks with small-scale datasets. LNRL aligns feature representation and label representation distribution in multiple feature spaces, learns the correlation between instances and label noise, and mitigates the impact of label noise.

The code of this project is developed based on SeisT.

Usage

Data Preparation

  • For training and evaluation

    Create a new file named mydata.py in the directory dataset/ to read the metadata and seismograms of the dataset. And the @register_dataset decorator needs to be used to register the custom dataset.

    (Please refer to the code example datasets/sos.py)

Training

  • Model
    Before starting training, please make sure that the model code is in the directory models/ and register it using the @register_model decorator. All available models in the project can be inspected by using the following method:

    >>> from models import get_model_list
    >>> get_model_list()
    ['lnrl','seist']
  • Model Configuration
    The configurations of the loss functions, labels, and the corresponding models are in config.py which also provides a detailed explanation of all the fields.

  • Start training
    To start training with a CPU or a single GPU, please use the following command to start training:

    python main.py \
      --seed 0 \
      --mode "train_test" \
      --model-name "lnrl" \
      --log-base "./logs" \
      --device "cuda:0" \
      --data "/root/data/Datasets/SOS" \
      --dataset-name "sos" \
      --sigma 600 \
      --data-split true \
      --train-size 0.8 \
      --val-size 0.1 \
      --shuffle true \
      --workers 8 \
      --in-samples 6000 \
      --augmentation true \
      --epochs 200 \
      --patience 30 \
      --batch-size 300

    Use torchrun if training with multiple GPUs.

    There are also a variety of other custom arguments which are not mentioned above. Use the command python main.py --help to see more details.

Testing

Use the following command to start testing:

python main.py \
  --seed 0 \
  --mode "test" \
  --model-name "lnrl" \
  --log-base "./logs" \
  --device "cuda:0" \
  --data "/root/data/Datasets/SOS" \
  --dataset-name "sos" \
  --data-split true \
  --train-size 0.8 \
  --val-size 0.1 \
  --workers 8 \
  --in-samples 6000 \
  --batch-size 300

It should be noted that the train_size, val_size, and seed in the test phase must be consistent with that training phase. Otherwise, the test results may be distorted.

Acknowledgement

This project refers to some excellent open source projects: PhaseNet, EQTransformer

License

Copyright S.Li et al. 2024. Licensed under an MIT license.

Packages

No packages published

Languages