Skip to content

lptvUchile/DH-DM-Earthquake-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNN-HMM Duration Modelling Earthquake Detection

This repository contains the codes of an end-to-end DNN-HMM based system with duration modelling for robust earthquake detection proposed in: Nombre_Paper


Description

The model proposed is an end-to-end DNN-HMM based scheme, i.e. it does not require previous phase-picking, backed by engineered features and combined with duration modelling of states and seismic events. The proposed engine requires 20 times or so fewer parameters than state-of-the-art methods and therefore needs a smaller training database. Moreover, duration modelling can increase the noise robustness of the detection system significantly, particularly with limited training data.


How to install

pip install -r requirements.txt

or:

conda env create -f env_DNN_HMM.yml


Tutorial

you can use the following for such:

The repository is mainly composed of three stages:

  • Feature extraction: It is implemented with the file features_extraction.py. It is used to obtain the feature vectors of the seismic traces. The result is a .npy file that is saved in the data/name_database/features folder.

  • Training: It consists of a series of steps. The most important files to be executed are the following:

    1. Main_Algoritmo_ViterbiForzado_GMM.py: This code implements the Viterbi Forced algorithm with the observation probabilities obtained from the GMM. The entry corresponds to a file generated by training a GMM with the Kaldi toolkit. In this case, a monophoneme model and a bigram language model were defined. The output of this file corresponds to the state-frame assignment and the sequence of the forced state alignments, both in a .npy format, in data/name_database/features path.

    2. Get_Prob_prior.npy: This file is located in src/utils/ folder. The input is the forced state-frame alignments of the training signals generated by Main_Algoritmo_ViterbiForzado_GMM, while the output is the prior probabilities.

    3. Train.py: This code is used to train and validate the model. The network weights are stored in the models folder.

    4. Test_ViterbiFordado_DNN.py: This code implements the Forced Viterbi algorithm with the observation probabilities obtained from the DDN. The output corresponds to forced alignments.

    5. Duration parameters: Using the forced alignments of the DNN, the minimum and maximum duration of each state and event is estimated with the file src/utils/Estadisticas_estado_evento.py. The results of these estimations must be inserted in the Restrictions_Duracion_Estado.py and Restrictions_Duracion_Evento.py files. To calculate the parameters of the gamma function of the events, the Constantes_Parameteros_Duracion.py code must be executed.

  • Testing: It is tested with the file src/models/test.py: the main objective of this code is to load an already trained model, which is saved in the models folder and test a new database. Detection times for each trace and a summary of the resulting metrics can be found in the src/models/Results folder


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages