if you are interested in becoming a collaborator let me know by creating an issue or gmail me nickgeoca
This implements a 1-D Continuous Wavelet Transform (CWT) in tensorflow. The benefit is that it runs parallel on GPUs.
The following wavelets are available:
Regarding CWT performance of Tensorflow vs Pywavelet, Pywavelet is about 13 times faster. However, this is a CPU only benchmark without using performance extensions, like AVX, on Tensorflow.
Col1 | Col2 | Result | Notes |
---|---|---|---|
Tensorflow CWT (GPU) | Tensorflow CWT (CPU) | GPU ~8x faster | old i5 vs GTX 750 TI ~1,400 GFLOPS |
Tensorflow CWT (CPU) | Pywavelet CWT (CPU) | Pywavelet CWT ~13x faster | Tensorflow w/o AVX extensions, etc |
Tensorflow CWT (CPU) | Pywavelet DWT (CPU) | Pywavelet DWT ~200,000x faster | Haar wavelet; Tensorflow w/o AVX extensions, etc |
This can be aquired by running python benchmark.py
wavExample.py. The audio sample rate is scaled down to 8000 samples per second (instead of typical 44100).
sinExample.py. It produces the plot below. The wavelet used is shown below (scale=32).
# Scipy's cwt can specify the wavelet scales in detail. This api can't do that.
cwt(wav, signal.ricker, [1,1.5,2,2.5,3])
# This api is equivilent to calling scipy's cwt as below.
cwt(wav, signal.ricker, range(1,n))