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

Time warp fails on short spectrogram #12

Open
tann9949 opened this issue Jul 22, 2020 · 10 comments
Open

Time warp fails on short spectrogram #12

tann9949 opened this issue Jul 22, 2020 · 10 comments

Comments

@tann9949
Copy link

Hi, I have a question whether the time warping can sometimes cause a spectrogram to be too distorted or not.

Screen Shot 2563-07-22 at 14 37 29

I applied Time Warping with W=2 and it sometimes results in ugly padding on the right side of the spectrogram. Is there any way to alleviate this problem?

@shangeth
Copy link

Hey did you find what's wrong? I am using Time Warp with W=2(tried with W=1,...10)
I am getting different features at each time.

run-1
Figure_1

run-2
Figure_2

@dtchantao
Copy link

Hey did you find what's wrong? I am using Time Warp with W=2(tried with W=1,...10)
I am getting different features at each time.

run-1
Figure_1

run-2
Figure_2

same here, any solutions?

@PrathamSoni
Copy link
Contributor

https://github.com/DemisEom/SpecAugment/blob/7f1435963b37ac8f9e4de9e44d754ecc41eaba85/SpecAugment/spec_augment_tensorflow.py#L46

It seems the implementation in this source code differs from the approach taken from in the above tensorflow implementation. This repo uses 2 points for fitting the transform, whereas the tf code uses multiple points

@zcaceres
Copy link
Owner

Great catch @PrathamSoni . Please feel free to PR. I'm afraid I have too much on my plate to fix this module.

@PrathamSoni
Copy link
Contributor

@zcaceres Will open the PR within the next couple of days.

This line in the bilinear interpolation is also deprecated (copying tensor from construct). I can patch that as well.
alpha = torch.tensor((queries - floor), dtype=grid_type, device=grid_device)

@keshawnhsieh
Copy link

Got same situation. This BUG seriously affects the model performance. Any updates? @PrathamSoni

@PrathamSoni PrathamSoni mentioned this issue Feb 9, 2021
@PrathamSoni
Copy link
Contributor

@keshawnhsieh just put up the pr. Could you let me know if it works better?

@keshawnhsieh
Copy link

@keshawnhsieh just put up the pr. Could you let me know if it works better?

Many thanks. I will test it after Chinese New Year.

@zcaceres
Copy link
Owner

Fantastic @PrathamSoni . Thanks so much.

@PrathamSoni
Copy link
Contributor

@thread especially @keshawnhsieh, I've made some fixes to the pull request. I think it should work perfectly now. LMK if you try it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants