|
Download README.md from MorphKnight1440/TremorCNN: direct link, hf CLI and curl.
- Browser
- Download file 6.82 kB
-
https://huggingface.co/MorphKnight1440/TremorCNN/resolve/main/README.md
- Command line
-
hf download hf://MorphKnight1440/TremorCNN/README.md
-
curl -L -o README.md https://huggingface.co/MorphKnight1440/TremorCNN/resolve/main/README.md
6.82 kB
| <div align="center"> | |
| <h1 align="center">TremorCNN</h1> | |
| <p align="center"> | |
| <a href="https://github.com/Eshwar1440/TremorCNN/blob/main/LICENSE"> | |
| <img alt="License" src="https://img.shields.io/github/license/Eshwar1440/TremorCNN"> | |
| </a> | |
| <a href="https://github.com/Eshwar1440/TremorCNN/issues"> | |
| <img alt="Issues" src="https://img.shields.io/github/issues/Eshwar1440/TremorCNN"> | |
| </a> | |
| <a href="https://github.com/Eshwar1440/TremorCNN/network/members"> | |
| <img alt="Forks" src="https://img.shields.io/github/forks/Eshwar1440/TremorCNN"> | |
| </a> | |
| <a href="https://github.com/Eshwar1440/TremorCNN/stargazers"> | |
| <img alt="Stars" src="https://img.shields.io/github/stars/Eshwar1440/TremorCNN"> | |
| </a> | |
| <a href="https://github.com/Eshwar1440/TremorCNN/commits/main"> | |
| <img alt="Last Commit" src="https://img.shields.io/github/last-commit/Eshwar1440/TremorCNN"> | |
| </a> | |
| </p> | |
| <p align="center"> | |
| <a href="https://huggingface.co/MorphKnight1440/TremorCNN"> | |
| <img alt="Model on HuggingFace" src="https://img.shields.io/badge/Model-TremorCNN-FFD21E?style=for-the-badge&logo=huggingface&logoColor=000"> | |
| </a> | |
| <a href="https://huggingface.co/datasets/MorphKnight1440/CascadiaTremorCatalog"> | |
| <img alt="Dataset on HuggingFace" src="https://img.shields.io/badge/Dataset-CascadiaTremorCatalog-FFD21E?style=for-the-badge&logo=huggingface&logoColor=000"> | |
| </a> | |
| <a href="https://pytorch.org/"> | |
| <img alt="Built with PyTorch" src="https://img.shields.io/badge/Built%20with-PyTorch-EE4C2C?style=for-the-badge&logo=pytorch&logoColor=white"> | |
| </a> | |
| </p> | |
| </div> | |
| # Low-Frequency Tremor Detection with Deep Learning | |
| A convolutional neural network that detects tectonic tremor in real seismic | |
| waveform data fetched live from the EarthScope/IRIS archive. Built as a | |
| proof-of-concept for automated tremor detection on the Cascadia subduction zone. | |
| --- | |
| ## What is Tectonic Tremor? | |
| Tectonic tremor is a weak, sustained seismic signal (1-8 Hz) generated by slow | |
| slip along fault boundaries. In Cascadia, tremor episodes occur every ~12-14 months | |
| and are closely linked to slow slip events that load stress onto the locked fault | |
| zone capable of producing a magnitude 9+ megathrust earthquake. Detecting tremor | |
| automatically across years of continuous data is a key open problem in seismology. | |
| --- | |
| ## Approach | |
| ``` | |
| Real waveform (IRIS/EarthScope) | |
| β | |
| Bandpass filter (1-8 Hz) | |
| β | |
| Short-Time Fourier Transform β spectrogram patch (45 x 10) | |
| β | |
| 2D CNN binary classifier (tremor / no tremor) | |
| β | |
| Predicted label + confidence | |
| ``` | |
| Labels are derived from the PNSN/Wech tremor catalog for confirmed Cascadia | |
| ETS episodes (Aug 2010, Sep 2011, Oct 2013). Quiet windows are drawn from | |
| periods with no known ETS activity across multiple times of day and seasons. | |
| --- | |
| ## Results | |
| | Metric | Value | | |
| |--------|-------| | |
| | Test Accuracy | 87.0% | | |
| | Precision | 0.186 | | |
| | Recall | 0.741 | | |
| | F1 | 0.297 | | |
| | ROC-AUC | 0.869 | | |
| | True Positives (tremor correctly detected) | 109 | | |
| | False Positives (quiet incorrectly flagged)| 477 | | |
| | True Negatives (quiet correctly identified)| 3326 | | |
| | False Negatives (tremors missed)| 38 | | |
| Trained on 15,796 spectrogram windows, tested on 3,950 held-out windows using chronological split: train/test boundary at 2016-01-05. Decision threshold: 0.80. | |
| Training loss curve: | |
|  | |
| Inference on unseen station UW.MRBL (Marblemount, WA) - Sep 15 2011 ETS(Episodic Tremor and Slip): | |
|  | |
| --- | |
| ## Data | |
| All waveform data fetched live via ObsPy from the EarthScope/IRIS FDSN | |
| (Federation of Digital Seismograph Networks) web service. No local waveform | |
| files required are data streams directly from the archive at runtime. | |
| - **Network:** UW (Pacific Northwest Regional Seismic Network) | |
| - **Stations:** GNW (Green Mountain WA), FORK (Forks WA), LEBA (Lebam WA) | |
| - **Channel:** BHZ/HHZ/EHZ (broadband vertical), resampled to 40 Hz | |
| - **Tremor labels:** PNSN catalog CSVs (tremor_events-YYYY.csv), 80,479 individual tremor event timestamps | |
| - **ETS episodes:** 2010, 2011, 2012, 2013, 2014, 2015-16, 2017, 2018 | |
| - **Quiet periods:** Mar 2010, Apr 2011, Jun 2012, Jun 2014, Jun 2015, Jun 2016, Jun 2019 | |
| - **Model weights:** [MorphKnight1440/TremorCNN](https://huggingface.co/MorphKnight1440/TremorCNN) | |
| - **Tremor catalog dataset:** [MorphKnight1440/CascadiaTremorCatalog](https://huggingface.co/datasets/MorphKnight1440/CascadiaTremorCatalog) | |
| --- | |
| ## Model Architecture | |
| ``` | |
| Input: (1, 45, 10) spectrogram patch | |
| β Conv2d(1β16, 3x3) + ReLU + MaxPool2d(2) # β (16, 22, 5) | |
| β Conv2d(16β32, 3x3) + ReLU + MaxPool2d(2) # β (32, 11, 2) | |
| β Flatten β Linear(704β64) + ReLU | |
| β Linear(64β1) | |
| ``` | |
| Binary Cross-Entropy loss, Adam optimizer (lr=1e-3), 20 epochs. | |
| --- | |
| ## Reproducing | |
| ```bash | |
| git clone https://github.com/Eshwar1440/TremorCNN | |
| cd TremorCNN | |
| pip install obspy torch numpy scipy matplotlib | |
| ``` | |
| # Train from scratch | |
| python train.py | |
| Downloads are needed to train, Please look at Data section for Hugging Face Dataset I used. | |
| # Run inference on unseen data (pretrained weights included) | |
| python predict.py | |
| --- | |
| ## Limitations | |
| - Cascadia subduction zone only, not tested on other tectonic settings | |
| - 18,007 training windows vs ~95,000 in the reference paper | |
| - Catalog labels have ~2.5-minute resolution, some window boundaries are approximate | |
| - Low precision (0.134) at default 0.7 threshold, threshold tuning needed for deployment | |
| - 2020/2021 ETS episodes excluded due to waveform archival gaps on GNW | |
| --- | |
| ## Future Work | |
| - Multi-station generalization (test on UW.LRIV, CN network stations) | |
| - Multi-station voting (classify it as tremor if more than 2 stations agree.) | |
| - Replace CNN with transformer architecture for long-range temporal patterns | |
| - Retrain on noise windows the model mistakes for tremor to cut false alarms | |
| - ROC curve analysis and threshold tuning for operational deployment | |
| - Integration with live EARTHSCOPE stream for real-time detection | |
| --- | |
| ## Related Work | |
| This project independently reproduces the core pipeline of: | |
| > Rouet-Leduc, B., Hulbert, C., McBrearty, I. W., & Johnson, P. A. (2020). | |
| > *Probing Slow Earthquakes With Deep Learning.* | |
| > Geophysical Research Letters, 47, e2019GL085870. | |
| > [DOI: 10.1029/2019GL085870](https://doi.org/10.1029/2019GL085870) | |
| That paper trained a CNN on ~165,000 Cascadia tremor examples from the PNSN | |
| catalog and showed the model generalizes across subduction zones and to the | |
| San Andreas Fault at Parkfield. | |
| --- | |
| ## Author | |
| Eshwar Singh Rajaputana. | |