Seismic Facies Identification Challenge
[Explainer] Additional Features with the Stationary Wavelet Transform (SWT)
Demonstrate the use of the Stationary Wavelet Transform (SWT) to perform a frequency based decomposition (filter banks) on the input time series data
Hello everyone, I was previously a Senior Geophysicist for a Seismic Processing company and I now work in Deep Reinforcement Learning for robotics. I find this competition really interesting as it combines my previous experience in Geophysics with my current area of research, Deep Neural Networks.
Here in this Colab Notebook I demonstrate the use of the Stationary Wavelet Transform (SWT) to perform a frequency based decomposition (filter banks) on the input time series data. For my submission I have used this as input to a UNET architecture, written in PyTorch. I would be happy to share the UNET implementation if this post gets some attention.
Best of luck with the competition!
# **Addtional features with the Stationary Wavelet Transform**
# By Edward Beeching, an ex Senior Geophysicist
!wget "https://datasets.aicrowd.com/default/aicrowd-public-datasets/seamai-facies-challenge/v0.1/public/data_train.npz"
!wget "https://datasets.aicrowd.com/default/aicrowd-public-datasets/seamai-facies-challenge/v0.1/public/labels_train.npz"
import numpy as np
import matplotlib.pyplot as plt
import pywt
%matplotlib inline
data=np.load('data_train.npz')['data'][:,:,580]
label = np.load('labels_train.npz')['labels'][:,:,580]
plt.rcParams['figure.figsize'] = [12, 8]
plt.imshow(data,cmap='gray',interpolation='none')
plt.show()
We will now apply the stationary wavelet transform to decompose the signal into frequency bands or "scales". I use a the coiflet 4 wavelet here, but there are many, have a look on pywavelets wavelet browser http://wavelets.pybytes.com/wavelet/coif4/
coefs = pywt.swt(np.pad(data,((0,18), (0,0))), "coif4", level=6, trim_approx=True, axis=0)
plt.rcParams['figure.figsize'] = [32, 16]
plt.subplot(2,4,1)
plt.imshow(data,cmap='gray',interpolation='none')
plt.title("Full bandwidth")
plt.subplot(2,4,2)
plt.imshow(label)
plt.title("Labels")
# I assume 4ms sampling
freqs = ['62-125', ["32-62"], ["16-32"], ["8-16"], ["4-8"], ["2-4"]]
for i, (coef, freq) in enumerate(zip(coefs[::-1], freqs),3):
plt.subplot(2,4,i)
plt.imshow(coef,cmap='gray',interpolation='none')
plt.title(freq)
plt.tight_layout()
plt.show()
We can then feed these in as additional channels to a UNET neural network architecture.
Content
Comments
You must login before you can post a comment.