Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mallat's scattering transform #50

Open
susnak opened this issue Jan 6, 2016 · 2 comments
Open

Add Mallat's scattering transform #50

susnak opened this issue Jan 6, 2016 · 2 comments

Comments

@susnak
Copy link
Contributor

susnak commented Jan 6, 2016

Add the scattering transform by Stephané Mallat.

This should now be actually possible using warpedfilters with logarithmic scale or with dual-tree complex wavelet transform dtwfb

@lostanlen
Copy link

I am a student of Stéphane Mallat so I'm going to comment on the topic.
The idea behind the scattering transform is fairly straightforward, but it requires some dexterity to have a fast implementation. The algorithm is a cascade of two wavelet transforms intertwined with complex modulus nonlinearities. Each level of the cascade is then averaged by the scaling function phi of the corresponding wavelet filterbank.
From my point of view, the improvements needed to make it fast are, by decreasing order of importance:

  1. wavelet transforms implemented as products in the Fourier domain
  2. downsampling of subbands according to the critical resolution after each of the wavelet transforms, by truncation in the Fourier domain
  3. leverage the fact that Gabor wavelets have narrow support to restrict the Fourier-domain product to its nonzero coefficients
  4. if the resolution of the second wavelet is finer that the resolution of the first wavelet (j1 > j2 in Mallat's notations), the result will be negligible so the computation of these coefficients can be spared
  5. for classification, the end user typically wants only a portion of the coefficients (j1 not to large, j2 not too small) so again, the corresponding computations could be spared
  6. vectorizing the output of the low-pass filtering to avoid stacking all coefficients at the end, hence reducing the memory footprint

I have limited experience with LTFAT and, if I recall well, your paradigm is to apply pyramidal schemes when possible. So you will possibly want to replace improvements (2) and (3) by a dyadic downsampling algorithm. I would love to hear your advice on this.

I have implemented the scattering transform in the MATLAB toolbox "scattering.m" I use for my research: https://github.com/lostanlen/scattering.m
The joint time-frequency scattering transform (see Andén et al MLSP 2015) is also implemented. It computes a wavelet transform over the log-frequency axis as well as over the time axis, hence bearing resemblance with cepstral coefficients. Is it in the scope of LTFAT ?
It is released under MIT license so feel free to re-use my code and research ideas. I can help with the integration into this repo.

@susnak
Copy link
Contributor Author

susnak commented Feb 11, 2016

Hello,
thank you for your input and for offering your code and your help.

We already do points 1-3 in the backend of the filterbank routine when using band-limited filterbanks. So it is only a matter of designing a new filterbank generating function (see e.g. cqtfilters, erbfilters).

I am not aware of any relevant pyramidal scheme for complex wavelets except for the dual-tree complex wavelet transform dtwfb and dtwfbreal, which is well known.

I am not familiar with the new version of the scattering transform, but it sounds interesting.
I will try to read the papers and the code and see whether it fits.

Zdenek

susnak added a commit that referenced this issue May 31, 2016
poly2mask was replaced by the version taken from Octave image processing
package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants