spec_augment icon indicating copy to clipboard operation
spec_augment copied to clipboard

Time warp fails on short spectrogram

Open tann9949 opened this issue 4 years ago • 10 comments

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?

tann9949 avatar Jul 22 '20 07:07 tann9949

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

shangeth avatar Aug 18 '20 07:08 shangeth

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?

dtchantao avatar Sep 30 '20 13:09 dtchantao

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

PrathamSoni avatar Jan 22 '21 22:01 PrathamSoni

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

zcaceres avatar Jan 28 '21 17:01 zcaceres

@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)

PrathamSoni avatar Jan 28 '21 18:01 PrathamSoni

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

keshawnhsieh avatar Feb 09 '21 03:02 keshawnhsieh

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

PrathamSoni avatar Feb 09 '21 19:02 PrathamSoni

@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.

keshawnhsieh avatar Feb 11 '21 06:02 keshawnhsieh

Fantastic @PrathamSoni . Thanks so much.

zcaceres avatar Feb 17 '21 21:02 zcaceres

@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!

PrathamSoni avatar Jun 10 '21 02:06 PrathamSoni