Open viggi1000 opened 6 years ago
Agreed. Wavelet transform is something that we should have in core/torchaudio.
What do you have in mind? I could offer to do something like this (takes coeffs from PyWavelets) for 1d/2d: https://github.com/t-vi/pytorch-tvmisc/blob/master/misc/2D-Wavelet-Transform.ipynb
@t-vi That sounds good for start, PytorchWavelet is a great implementation which used nn.Conv1d and used numpy complex numbers to find wavelets. Other transforms like Gabor, Fourier would be appreciated.
@vincentqb do we have something like this in torchaudio at this point?
We do have the STFT (torch.stft and torch.istft) and Spectrogram transform (in audio). These are related to the fast Fourier transform, torch.fft.
We do not have the wavelet transform in audio yet, though it is used in audio. I've opened an issue requesting use case for it in pytorch/audio#1169.
We also have a discussion ongoing in pytorch/audio#267 about where should more general time series transformation lives.
I think the wavelet transform is relevant enough in vision to have it in PyTorch rather than audio.
Hi @soumith, As discussed today researchers dealing with 1-D signals (Biomedical mainly) would find it immensely helpful if we can get something similar to the Torch-Signal for applying cuda optimized transforms like Wavelet/FFT to 1D signals. Presently we have to apply transforms on scipy or numpy or use libraries like PytorchWavelet which too rely on cpu based libraries to apply the transform and just wrap around PyTorch's Conv1D function. It would be amazing to get a library to do the same in CUDA allowing us to integrate wavelet transforms in our training pipeline in runtime as opposed to us applying the tranform on hours long signals.
Thank you for hearing me out and thanks for the amazing presentation today.