mad-twinnet icon indicating copy to clipboard operation
mad-twinnet copied to clipboard

about overlapping frames

Open MaeThird opened this issue 4 years ago • 3 comments

Hi, Thanks for your inspiring working.After read your paper and code in data_feeder.py,I have some questions. Let's say,for example,N = 2049,the sequence length(T) is 60 ,the overlapping subsequences(L) is 10 and the hop is 384.So for a wav file with 16KHz and duration 4 seconds,after the stft we can get the transformed array with shape [16000 * 4 / 384,2049],it's [166,2049].If the current set size is 4, the output of stft is [166*4,2049],it's [664,2049],and then we will make the overlapping subsequences with this array. According to your code in _make_overlap_sequences,more precisely with these codes:

 mixture = stride_tricks.as_strided(
        mixture,
        shape=(int(mixture.shape[0] / (l_size - o_lap)), l_size, mixture.shape[1]),
        strides=(mixture.strides[0] * (l_size - o_lap), mixture.strides[0], mixture.strides[1])
    )
 mixture = voice[:-1, :, :]

there the l_size == 60, o_lap == 20 so we get the mixture with shape:[16, 60, 2049] I mean the mixture[1] is 20 frames overlapped with mixture[0] and 20 frames overlapped with mixture[2],the mixture[2] is 20 frames overlapped with mixture[1] and 20 frames overlapped with mixture[3] ...
Consequently,in code def epoch_it():

                mix_batch = mix[b_start:b_end, :, :]
                voice_true_batch = voice_true[b_start:b_end, context_length:-context_length, :]

for the voice_truth_batch the leading 10 frames and the backing 10 frames are stripped left with 40 frames and in these 40 frames there are still 10 overlapped frames ahead and 10 overlapped frames backing.There are only 20 frames which are not overlapped. Why you make 2*L as the overlapping length to the param passed to _make_overlap_sequences?

MaeThird avatar Jul 31 '19 02:07 MaeThird

Thank you for your comment!

Please allow me a couple of days more to look more closely to what you are asking.

dr-costas avatar Aug 01 '19 04:08 dr-costas

Hi I am really new to this whole things can anyone help me with specifying paths of this dataset. I could not find _get_files_lists function, in the helpers directory as mentioned in the readme file. All I could find is a settings.py which has many paths specified. Is that the thing I should edit to show my dataset?

allenbaby avatar Jul 31 '20 08:07 allenbaby

Hi I am really new to this whole things can anyone help me with specifying paths of this dataset. I could not find _get_files_lists function, in the helpers directory as mentioned in the readme file. All I could find is a settings.py which has many paths specified. Is that the thing I should edit to show my dataset?

Hello! In the settings.py and line 33, you need to define the path to the data-set. By default, the 'dataset' folder in the repository is used. Please download MUSDB-HQ data-set first and unzip to your desired location or in the 'dataset' folder.

Js-Mim avatar Aug 05 '20 12:08 Js-Mim