Skip to content

Sakeeb91/seismic-event-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seismic Event Detection and Phase Picking

A deep learning system for automated earthquake detection and P/S wave arrival time picking, inspired by EQTransformer. Built using the STEAD dataset with multi-task learning architecture.

Overview

Seismic monitoring networks generate terabytes of continuous data daily. This project implements automated detection and phase picking that enables real-time earthquake early warning, comprehensive catalog generation, and seismic event monitoring at scale.

Features

  • Multi-task deep learning model (detection + P-pick + S-pick)
  • Classical STA/LTA baseline for comparison
  • Three-component seismogram processing (E, N, Z)
  • Gaussian probability output for arrival times
  • Sub-second picking accuracy
  • Production-ready inference pipeline

Signal Processing Pipeline

Raw 3C Waveform → Bandpass Filter (1-45Hz) → Detrend → Normalize →
                → Model Input (6000, 3) → Detection + P-pick + S-pick

Project Structure

seismic-event-detection/
├── data/                      # STEAD dataset (not tracked)
├── models/                    # Saved model weights
├── notebooks/
│   └── EDA.ipynb             # Exploratory analysis
├── src/
│   ├── data_loader.py        # STEAD HDF5 loading
│   ├── preprocessing.py      # Filtering, normalization
│   ├── sta_lta.py            # Classical detection baseline
│   ├── models.py             # EQTransformer-lite architecture
│   ├── train.py              # Multi-task training
│   ├── evaluate.py           # Detection and picking metrics
│   ├── visualize.py          # Waveform plotting
│   └── inference.py          # Production detection
├── scripts/
│   ├── download_data.py
│   └── demo.py
├── docs/
│   └── IMPLEMENTATION_PLAN.md
├── requirements.txt
└── README.md

Quick Start

# Clone the repository
git clone https://github.com/Sakeeb91/seismic-event-detection.git
cd seismic-event-detection

# Install dependencies
pip install -r requirements.txt

# Download STEAD dataset (follow instructions)
python scripts/download_data.py

# Train model
python src/train.py

# Evaluate
python src/evaluate.py

# Run demo
python scripts/demo.py

Dataset

STEAD (STanford EArthquake Dataset)

  • 1.2 million three-component seismograms
  • ~450,000 earthquakes globally
  • High-quality P and S arrival time labels
  • Format: HDF5 files with CSV metadata
  • Each trace: (6000, 3) = 60 seconds at 100 Hz

Model Architecture

Multi-task model predicting:

  1. Detection probability - Is there an earthquake?
  2. P-wave probability - Gaussian around P arrival
  3. S-wave probability - Gaussian around S arrival
Input (3, 6000) → ResNet Encoder → Transformer → 3 Decoder Branches
                                              ├── Detection (1, 6000)
                                              ├── P-pick (1, 6000)
                                              └── S-pick (1, 6000)

Expected Results

Metric Target
Detection F1 0.95+
P-pick MAE 0.1-0.2 seconds
S-pick MAE 0.2-0.3 seconds

Requirements

  • Python 3.8+
  • PyTorch 1.9+
  • See requirements.txt for full dependencies

License

MIT License

References

  • Mousavi et al. "Earthquake Transformer—An Attentive Deep-Learning Model for Simultaneous Earthquake Detection and Phase Picking"
  • STEAD Dataset: https://github.com/smousavi05/STEAD

About

Deep learning system for earthquake detection and P/S wave phase picking using STEAD dataset

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages