Skip to content

GeoCode-polymtl/DL_VEI_SSP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-input multi-output NN for inverting velocity and attenuation on subsea permafrost regions

Background

Marine seismic surveys can be used to map ice-bearing subsea permafrost. However, the conventional seismic techniques that have been used to determine the lateral extent of subsea permafrost are limited for evaluating its vertical variation in regional-scale mapping. This repository presents a deep learning approach that enebled the generation of more reliable and accurate velocity and attenuation models from seismic data using a multi-input multi-ouput NN and a transfer learning technique. This repository follows the developments presented in "Deep-learning viscoelastic seismic inversion for subsea permafrost mapping" submitted to Geophysics.

Requirements, dataset download and preprocessing

Installing required packages

The package requirements for runing the code are summarized in the file requirements.txt. Note that the package SeisCL is availabel in https://github.com/gfabieno/SeisCL, the packege GeoFlow is available in https://github.com/gfabieno/GeoFlow, and the package ModelGenerator is available in https://github.com/gfabieno/ModelGenerator. Please download and install these packages following the intructions on the corresponding repository. To install the remaining required packages, run the following command in the terminal:

pip install -r requirements.txt

Downloading raw dataset

This repository evaluate lines 6 and 7 from the seismic data collected on the ARA05C survey on the Canadian Beaufort Sea. The raw data is available at https://doi.org/10.22663/kopri-kpdc-00002217.1 ((Kang et al. 2023)). Please download the data, downsample it to 2 ms , apply a time window to 2s and convert it to the .sgy standard. This procedure can be done using external packages as Vista (https://www.software.slb.com/products/vista) or Seismic Unix (https://github.com/JohnWStockwellJr/SeisUnix). The data should be stored in the folder Preprocessing/Raw2sec with the following names:

['line06_geom_raw.sgy', 'ARA05C_line7_raw_2sec.sgy']

Note that a copy of the .sgy files is available with the repository.

Preprocessing raw dataset

The raw dataset is preprocessed in two steps as follows:

  1. Time shifting: The shot gathers are time shifted to match the direct arrival as defined for the NN trainin dataset. For applying the time shift, the file Preprocessing/TimeShift.py is used. The time shift is applied using the following command:
cd Preprocessing
python timeshift.py -ln 05-06
python timeshift.py -ln 05-07
cd .. # return to the main folder
  1. CMP datasorting The shot gathers should be arranged to CMP gathers before passing through the NN. This is done using the file Preprocessing/datasorting_cmp_from_offset.py as follows:
cd Preprocessing
python datasorting_cmp_from_offset.py -ln 05-06
python datasorting_cmp_from_offset.py -ln 05-07
cd .. # return to the main folder

Running the code

The proposed methodology use a trasnfer learning (TL) technique to train the NN. Initially a 1D NN is trained using synthetic datasets representative of 1D velocity and attenuation models. Then, the weights of the 1D NN are used to initialize the weights of a 2D NN. The 2D NN is aslo trained using synthetic models. The following describes the code required for generating the respective datasets and to train the NN. Note that generating a new dataset and training the NN can lead to different results to the presented in the paper. The results presented in the paper are obtained using the datasets and NN weights available in the repository.

Generating 1D dataset (OPTIONAL)

The 1D dataset is generated using the file SSP_NN_1D/CNN_Average.py. The dataset is generated using the following command:

cd SSP_NN_1D
python CNN_Average.py -gd -gdd
cd .. # return to the main folder

The command generates 4 clean subsets using SeisCL. Then it adds noise to the datasets and transform them to the 4 input domains for the NN. The datasets are stored in the folder SSP_NN_1D/Datasets.

Training 1D NN (OPTIONAL)

The 1D NN is trained using the dataset in the folder SSP_NN_1D/Datasets and the file SSP_NN_1D/CNN_Average.py. The training is done using the following command:

cd SSP_NN_1D
python CNN_Average.py -t -it 0 -nt 64 -epoch 35 -multi_out
cd .. # return to the main folder

The command trains 64 NN using the 4 input domains and the 3 output domains. The NN are trained using 35 epochs. The weights of the NN are stored in the folder SSP_NN_1D/Checkpoints. Note that the NN weights are available in the repository. Note that if multiple GPU are available, the NN could be trained in parallel changing the option initial trainig parameter -it and the number of NN to train -nt. For example, if 4 GPUs are available, the NN could be trained using the following command:

cd SSP_NN_1D
python CNN_Average.py -t -it 0 -nt 16 -epoch 35 -multi_out -gpu 0
python CNN_Average.py -t -it 16 -nt 16 -epoch 35 -multi_out -gpu 1
python CNN_Average.py -t -it 32 -nt 16 -epoch 35 -multi_out -gpu 2
python CNN_Average.py -t -it 48 -nt 16 -epoch 35 -multi_out -gpu 3
cd .. # return to the main folder

In either case we recommend generating local copies of the datasets for training the NNs in parallel.

We can also train NNs using single inputs and multiple outputs as follows:

cd SSP_NN_1D
python CNN_Average.py -t -it 0 -nt 16 -epoch 35 -multi_out -dt shotgather
python CNN_Average.py -t -it 0 -nt 16 -epoch 35 -multi_out -dt dispersion
python CNN_Average.py -t -it 0 -nt 16 -epoch 35 -multi_out -dt radon
python CNN_Average.py -t -it 0 -nt 16 -epoch 35 -multi_out -dt fft_radon
cd .. # return to the main folder

Generating 2D dataset (OPTIONAL)

The 2D dataset is generated using the file SSP_NN_1D2D/NN_1D2D. The dataset is generated using the following command:

cd SSP_NN_1D2D
python NN_1D2D.py -gd
cd .. # return to the main folder

Training 2D NN (OPTIONAL)

The 2D training read the weight from the 1D NN Checkpoints in SSP_NN_1D/Checkpoints and train the 2D NN using the 2D dataset in SSP_NN_1D2D/Dataset. The training is done using the following command:

cd SPP_NN_1D2D
python NN_1D2D.py -t -it 0 -nt 64 -epoch 20 -ncmps 11

The weights of the 2D NN are stored in the folder SSP_NN_1D2D/Checkpoints. Note that the NN weights are available in the repository.

Figures

Figure 4 presents the total loss and especific losses after training 64 similar 1D NNs. The figure can be reproduced using the following command:

cd Figures
python Figure_training.py
cd .. # return to the main folder

Figure_training

Figure 5 presente the total losses for the 1D and 2D dataset after training 64 similar 1D NNs and 64 similar 2D NNs. The figure can be reproduced using the following command:

cd Figures
python Figure_TLTraining.py
cd .. # return to the main folder

Figure_TLTraining

Figure 9 evaluate a single input and the multi-input NN on a synthetic dataset. The figure can be reproduced using the following command:

cd Figures
python Figure_NN_Synthetics.py
cd .. # return to the main folder

Figure_NN_Synthetics

For running Figures 10-12 it is necessary to evaluate the NN on the seismic line ARA05C-06 and ARA05C-07. This can be done using the following command:

For the 1D NN

cd SSP_NN_1D
python EvaluateNN_1D.py -ln 05-06
python EvaluateNN_1D.py -ln 05-07
cd .. # return to the main folder

For the TL NN

cd SSP_NN_1D2D
python Evaluate.py -ln 05-06
python Evaluate.py -ln 05-07
cd .. # return to the main folder

Figure 10 presents the inverted Vp, Vs and 1/Q models for the seismic line ARA05C-06. Figure 11 compares the inverted Vp on lines ARA05C-06 and ARA05C-07 using the 1D and 2D NN and compers the inversion in the intersection between the lines. Finally, Figure 12 compares a section of the last 20 km or line ARA05C-06 inverted using first break travel time tomography and the 2D NN. The figures can be reproduced using the following commands:

cd Figures
python NN_line06.py # Generates Figures 10 and 12
python Evaluating1D2D_ln_06_07.py # Generates Figure 11
cd .. # return to the main folder

NN_line06 Evaluating_1D_2D NN_ttt_line06

Authors

Jefferson Bustamante Restrepo (Polytechnique Montreal, Geological Survey of Canada),
Gabriel Fabien-Ouellet (Polytechnique Montreal),
Mathieu Duchesne (Geological Survey of Canada),
Amr Ibrahim (Polytechnique Montreal),

References

[1] Kang Seung-Goo, Young Keun Jin, Jongkuk Hong, 2023. Geophysical data (multi channel seismic data) collected during the 2013 ARA04C and 2014 ARA05C expeditions on the Beaufort sea. Available at: https://doi.org/10.22663/kopri-kpdc-00002217.1.

About

A deep learning viscoelastic seismic inversion approahc for subsea permafrost mapping

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors