Skip to main content

WaveTF: A Fast 2D Wavelet Transform for Machine Learning in Keras

  • Conference paper
  • First Online:
Pattern Recognition. ICPR International Workshops and Challenges (ICPR 2021)

Part of the book series: Lecture Notes in Computer Science ((LNIP,volume 12661))

Included in the following conference series:

Abstract

The wavelet transform is a powerful tool for performing multiscale analysis and it is a key subroutine in countless applications, from image processing to astronomy. Recently, it has extended its range of users to include the ever growing machine learning community. For a wavelet library to be efficiently adopted in this context, it needs to provide transformations which can be integrated seamlessly in already existing machine learning workflows and neural networks, being able to leverage the same libraries and run on the same hardware (e.g., CPU vs GPU) as the rest of the machine learning pipeline, without impacting training and evaluation performance. In this paper we present WaveTF, a wavelet library available as a Keras layer, which leverages TensorFlow to exploit GPU parallelism and can be used to enrich already existing machine learning workflows. To demonstrate its efficiency we compare its raw performance against other alternative libraries and finally measure the overhead it causes to the learning process when it is integrated in an already existing Convolutional Neural Network.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Abadi, M., et al.: Tensorflow: a system for large-scale machine learning. In: 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), pp. 265–283 (2016)

    Google Scholar 

  2. Addison, P.S.: The Illustrated Wavelet Transform Handbook: Introductory Theory and Applications in Science, Engineering, Medicine and Finance. CRC Press, Boca Raton (2017)

    Google Scholar 

  3. Amin, H.U., et al.: Feature extraction and classification for eeg signals using wavelet transform and machine learning techniques. Australas. Phys. Eng. Sci. Med. 38(1), 139–149 (2015)

    Article  Google Scholar 

  4. Bruna, J., Mallat, S.: Invariant scattering convolution networks. IEEE Trans. Pattern Anal. Mach. Intell. 35(8), 1872–1886 (2013)

    Article  Google Scholar 

  5. Burgess, J.: Rtx on-the nvidia turing gpu. IEEE Micro 40(2), 36–44 (2020)

    Article  Google Scholar 

  6. Chollet, F., et al.: Keras: the python deep learning library. Astrophysics Source Code Library (2018)

    Google Scholar 

  7. Daubechies, I.: Orthonormal bases of compactly supported wavelets. Commun. Pure Appl. Math. 41(7), 909–996 (1988)

    Article  MathSciNet  Google Scholar 

  8. Daubechies, I.: Ten Lectures on Wavelets, vol. 61. Siam, Thailand (1992)

    Google Scholar 

  9. Fujieda, S., Takayama, K., Hachisuka, T.: Wavelet convolutional neural networks for texture classification (2017)

    Google Scholar 

  10. Haug, K.M.: Stability of Adaptive Neural Networks for Image Reconstruction. Master’s thesis (2019)

    Google Scholar 

  11. Howard, J.: Fastai’s imagenette and imagewoof datasets (2020). https://github.com/fastai/imagenette

  12. Huang, H., He, R., Sun, Z., Tan, T.: Wavelet-srnet: a wavelet-based cnn for multi-scale face super resolution. In: The IEEE International Conference on Computer Vision (ICCV) (2017)

    Google Scholar 

  13. Jouppi, N., Young, C., Patil, N., Patterson, D.: Motivation for and evaluation of the first tensor processing unit. IEEE Micro 38(3), 10–19 (2018)

    Article  Google Scholar 

  14. Lee, G., Gommers, R., Waselewski, F., Wohlfahrt, K., O’Leary, A.: Pywavelets: a python package for wavelet analysis. J. Open Source Softw. 4(36), 1237 (2019)

    Article  Google Scholar 

  15. Liu, P., Zhang, H., Lian, W., Zuo, W.: Multi-level wavelet convolutional neural networks. IEEE Access 7, 74973–74985 (2019)

    Article  Google Scholar 

  16. Livani, H., Evrenosoglu, C.Y.: A machine learning and wavelet-based fault location method for hybrid transmission lines. IEEE Trans. Smart Grid 5(1), 51–59 (2013)

    Article  Google Scholar 

  17. Lohne, M.: Parseval Reconstruction Networks. Master’s thesis (2019)

    Google Scholar 

  18. Mallat, S.G.: A theory for multiresolution signal decomposition: the wavelet representation. IEEE Trans. Pattern Anal. Mach. Intell. 11(7), 674–693 (1989)

    Article  Google Scholar 

  19. Oliveira, B.: pytest Quick Start Guide: Write Better Python Code with Simple and Maintainable Tests. Packt Publishing Ltd., Birmingham (2018)

    Google Scholar 

  20. Paleo, P.: pypwt, parallel discrete wavelet transform (2020). https://github.com/pierrepaleo/pypwt

  21. Rodriguez, M.X.B., et al.: Deep adaptive wavelet network. In: The IEEE Winter Conference on Applications of Computer Vision, pp. 3111–3119 (2020)

    Google Scholar 

  22. Russakovsky, O., et al.: ImageNet large scale visual recognition challenge. Int. J. Comput. Vis. (IJCV) 115(3), 211–252 (2015)

    Article  MathSciNet  Google Scholar 

  23. Walt, S.V.D., Colbert, S.C., Varoquaux, G.: The NumPy array: a structure for efficient numerical computation. Comput. Sci. Eng. 13(2), 22–30 (2011)

    Google Scholar 

Download references

Acknowledgments

I’d like to thank G. Busonera and L. Pireddu for reviewing the draft and S. Leo for his suggestions on structuring the Python code. This work has been funded by the European Commission under the H2020 program grant DeepHealth (n. 825111).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Francesco Versaci .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Versaci, F. (2021). WaveTF: A Fast 2D Wavelet Transform for Machine Learning in Keras. In: Del Bimbo, A., et al. Pattern Recognition. ICPR International Workshops and Challenges. ICPR 2021. Lecture Notes in Computer Science(), vol 12661. Springer, Cham. https://doi.org/10.1007/978-3-030-68763-2_46

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-68763-2_46

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-68762-5

  • Online ISBN: 978-3-030-68763-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics