Skip to content

add noise and reverberance version for BinauralWSJ0Mix - #1502

Merged
ycemsubakan merged 7 commits into
speechbrain:developfrom
huangzj421:Binaural-WSJ0Mix
Sep 5, 2022
Merged

ycemsubakan merged 7 commits into
speechbrain:developfrom
huangzj421:Binaural-WSJ0Mix

Conversation

@huangzj421

Copy link
Copy Markdown
Contributor

Hi there,
I have created a noise and reverberance version of BinauralWSJ0Mix datasets and trained with convtasnet-parallel structure. Here are the recipes and not conflicted with the clean version of datasets.
Also, I have trained convtasnet-parallel.yaml again and got a better results which I could share you with the Google Driver.
Thanks.

@mravanelli
mravanelli requested a review from ycemsubakan July 19, 2022 13:52
@mravanelli

Copy link
Copy Markdown
Collaborator

@ycemsubakan

@huangzj421

Copy link
Copy Markdown
Contributor Author

Hi @ycemsubakan , do you have time for checking this PR please?

@ycemsubakan

Copy link
Copy Markdown
Collaborator

Hi @huangzj421 , sorry for the delay. I will try to do it soon.

@ycemsubakan

ycemsubakan commented Jul 31, 2022 •

Copy link
Copy Markdown
Collaborator

@huangzj421 , Could you add in the README the instructions on how to run the model with these noisy conditions? As before, the script should automatically download and create the corresponding dataset. I would like to try myself if everything works correctly.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

For convtasnet-parallel-noisy.yaml I am getting this error. You can see the command I used also here.

image

@ycemsubakan

ycemsubakan commented Jul 31, 2022 •

Copy link
Copy Markdown
Collaborator

And, I am observing the following error for convtasnet-parallel-reverb.yaml:

image

Please note that I tried convtasnet-parallel.yaml, and that seems to work fine.
Correction: Actually, I am also observing that the is stuck at 80, and it doesn't go down for `convtasnet-parallel.yaml'. In the previous PR, I tried and it the error was going down as expected.. I am not sure what's happening here..

@huangzj421

Copy link
Copy Markdown
Contributor Author

For convtasnet-parallel-noisy.yaml I am getting this error. You can see the command I used also here.

image

I have corrected the data generation scripts and now these should work fine.

@huangzj421

Copy link
Copy Markdown
Contributor Author

@huangzj421 , Could you add in the README the instructions on how to run the model with these noisy conditions? As before, the script should automatically download and create the corresponding dataset. I would like to try myself if everything works correctly.

The usage is the same as the previous PR which you should only set wsj_root and output_root and it will download and generate data into output_root.

@huangzj421

Copy link
Copy Markdown
Contributor Author

And, I am observing the following error for convtasnet-parallel-reverb.yaml:

image

Please note that I tried convtasnet-parallel.yaml, and that seems to work fine. Correction: Actually, I am also observing that the is stuck at 80, and it doesn't go down for `convtasnet-parallel.yaml'. In the previous PR, I tried and it the error was going down as expected.. I am not sure what's happening here..

I am sorry that I don't understand the "Correction" part you said. Also the test check failed but I don't know why.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

Actually, if the dataset is already created, we should not require wsj_root again, right?

@ycemsubakan

Copy link
Copy Markdown
Collaborator

What I mean with the 'correction' part is that, when I run the script, (with convtasnet_parallel.yaml, the error does not go down. It is stuck at 80.

@huangzj421

Copy link
Copy Markdown
Contributor Author

Actually, if the dataset is already created, we should not require wsj_root again, right?

Yes, if the dataset is done and dynamic mixing don't need it in the hparams["base_folder_dm"].

@huangzj421

Copy link
Copy Markdown
Contributor Author

OK, let me check it.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

Yes, but we would also not need wsj_root if the dataset is already created.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

For convtasnet-parallel-noisy.yaml I am getting this error. You can see the command I used also here.
image

I have corrected the data generation scripts and now these should work fine.

Ok, can you push your code after this correction in the data generation script?

@huangzj421

Copy link
Copy Markdown
Contributor Author

For convtasnet-parallel-noisy.yaml I am getting this error. You can see the command I used also here.
image

I have corrected the data generation scripts and now these should work fine.

Ok, can you push your code after this correction in the data generation script?

Oh, it doesn't need to push cause I just corrected in my repo.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

For convtasnet-parallel-noisy.yaml I am getting this error. You can see the command I used also here.
image

I have corrected the data generation scripts and now these should work fine.

Ok, can you push your code after this correction in the data generation script?

Oh, it doesn't need to push cause I just corrected in my repo.

I am now getting this error:

image

@huangzj421

Copy link
Copy Markdown
Contributor Author

For convtasnet-parallel-noisy.yaml I am getting this error. You can see the command I used also here.
image

I have corrected the data generation scripts and now these should work fine.

Ok, can you push your code after this correction in the data generation script?

Oh, it doesn't need to push cause I just corrected in my repo.

I am now getting this error:

image
It seems that the download link is invalid. I am trying to search another one.

@huangzj421

Copy link
Copy Markdown
Contributor Author

What I mean with the 'correction' part is that, when I run the script, (with convtasnet_parallel.yaml, the error does not go down. It is stuck at 80.

What is the unit of 80? 80%?

@huangzj421

Copy link
Copy Markdown
Contributor Author

Hi @ycemsubakan , I have fixes some errors in train.py and the data generation scripts in my repo. After you remove the previous BinauralWSJ0Mix folder and run train.py again, it will download automatically and train smoothly.
But I still don't know the 80 stuck you said and pytest check failure. Thanks.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

Hi @ycemsubakan , I have fixes some errors in train.py and the data generation scripts in my repo. After you remove the previous BinauralWSJ0Mix folder and run train.py again, it will download automatically and train smoothly. But I still don't know the 80 stuck you said and pytest check failure. Thanks.

  • The test failures is a general problem at the moment due to an external dependency. (not because of this PR)
  • The error is basically stuck for some reason at 80 dB negative SI-SNR and it doesn't go down. When you created the first PR, I trained the model for an epoch, and it was fine.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

The noisy version seems to work after your last push. (the data generation)

But the loss is still kind of stuck:
Capture d’écran, le 2022-08-01 à 10 25 49

@huangzj421

huangzj421 commented Aug 1, 2022 •

Copy link
Copy Markdown
Contributor Author

The noisy version seems to work after your last push. (the data generation)

But the loss is still kind of stuck: Capture d’écran, le 2022-08-01 à 10 25 49

It was weired cause I just trained and the loss went down well:
image
My command was:
CUDA_VISIBLE_DEVICES=3,5,6,7 python -m torch.distributed.launch --nproc_per_node=4 train.py hparams/convtasnet-parallel.yaml --data_folder /mnt/test/ --wsj_root /mnt/wsj/ --distributed_launch --distributed_backend='nccl'
Your loss was too big, did you use the dynamic mixing?

@ycemsubakan

Copy link
Copy Markdown
Collaborator

The noisy version seems to work after your last push. (the data generation)
But the loss is still kind of stuck: Capture d’écran, le 2022-08-01 à 10 25 49

It was weired cause I just trained and the loss went down well: image My command was: CUDA_VISIBLE_DEVICES=3,5,6,7 python -m torch.distributed.launch --nproc_per_node=4 train.py hparams/convtasnet-parallel.yaml --data_folder /mnt/test/ --wsj_root /mnt/wsj/ --distributed_launch --distributed_backend='nccl' Your loss was too big, did you use the dynamic mixing?

No, I am not using dynamic mixing. I am training on a single gpu. Can you try training on a single gpu?

@huangzj421

Copy link
Copy Markdown
Contributor Author

The noisy version seems to work after your last push. (the data generation)
But the loss is still kind of stuck: Capture d’écran, le 2022-08-01 à 10 25 49

It was weired cause I just trained and the loss went down well: image My command was: CUDA_VISIBLE_DEVICES=3,5,6,7 python -m torch.distributed.launch --nproc_per_node=4 train.py hparams/convtasnet-parallel.yaml --data_folder /mnt/test/ --wsj_root /mnt/wsj/ --distributed_launch --distributed_backend='nccl' Your loss was too big, did you use the dynamic mixing?

No, I am not using dynamic mixing. I am training on a single gpu. Can you try training on a single gpu?

It was not so big as well:
image

@ycemsubakan

Copy link
Copy Markdown
Collaborator

The noisy version seems to work after your last push. (the data generation)
But the loss is still kind of stuck: Capture d’écran, le 2022-08-01 à 10 25 49

It was weired cause I just trained and the loss went down well: image My command was: CUDA_VISIBLE_DEVICES=3,5,6,7 python -m torch.distributed.launch --nproc_per_node=4 train.py hparams/convtasnet-parallel.yaml --data_folder /mnt/test/ --wsj_root /mnt/wsj/ --distributed_launch --distributed_backend='nccl' Your loss was too big, did you use the dynamic mixing?

No, I am not using dynamic mixing. I am training on a single gpu. Can you try training on a single gpu?

It was not so big as well: image

Hm.. weird.. I am not sure why this is happening when I try. This doesn't happen with other recipes. I'll try to understand what's happening.

@huangzj421

Copy link
Copy Markdown
Contributor Author

The noisy version seems to work after your last push. (the data generation)
But the loss is still kind of stuck: Capture d’écran, le 2022-08-01 à 10 25 49

It was weired cause I just trained and the loss went down well: image My command was: CUDA_VISIBLE_DEVICES=3,5,6,7 python -m torch.distributed.launch --nproc_per_node=4 train.py hparams/convtasnet-parallel.yaml --data_folder /mnt/test/ --wsj_root /mnt/wsj/ --distributed_launch --distributed_backend='nccl' Your loss was too big, did you use the dynamic mixing?

No, I am not using dynamic mixing. I am training on a single gpu. Can you try training on a single gpu?

It was not so big as well: image

Hm.. weird.. I am not sure why this is happening when I try. This doesn't happen with other recipes. I'll try to understand what's happening.

Maybe you could remove all the dataset and train it again?

@ycemsubakan

Copy link
Copy Markdown
Collaborator

The noisy version seems to work after your last push. (the data generation)
But the loss is still kind of stuck: Capture d’écran, le 2022-08-01 à 10 25 49

It was weired cause I just trained and the loss went down well: image My command was: CUDA_VISIBLE_DEVICES=3,5,6,7 python -m torch.distributed.launch --nproc_per_node=4 train.py hparams/convtasnet-parallel.yaml --data_folder /mnt/test/ --wsj_root /mnt/wsj/ --distributed_launch --distributed_backend='nccl' Your loss was too big, did you use the dynamic mixing?

No, I am not using dynamic mixing. I am training on a single gpu. Can you try training on a single gpu?

It was not so big as well: image

Hm.. weird.. I am not sure why this is happening when I try. This doesn't happen with other recipes. I'll try to understand what's happening.

Maybe you could remove all the dataset and train it again?

Yes, I already tried that. I generated the dataset from scratch.

@huangzj421

Copy link
Copy Markdown
Contributor Author

Hi @ycemsubakan, do you have any updates?

@ycemsubakan

Copy link
Copy Markdown
Collaborator

@huangzj421 No, I will try to get to it this week.

@huangzj421

Copy link
Copy Markdown
Contributor Author

@huangzj421 No, I will try to get to it this week.

Okay, thanks!

@ycemsubakan

ycemsubakan commented Aug 8, 2022 •

Copy link
Copy Markdown
Collaborator

With convtasnet-parallel-noise.yaml, I observed the following error. Do you see it also?

image

@huangzj421

Copy link
Copy Markdown
Contributor Author

With convtasnet-parallel-noise.yaml, I observed the following error. Do you see it also?

image

No, I guess you should update the automatic downloaded data generation scripts from https://github.com/huangzj421/Binaural-WSJ0Mix or you can remove the old version in your data_folder.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

With convtasnet-parallel-noise.yaml, I observed the following error. Do you see it also?
image

No, I guess you should update the automatic downloaded data generation scripts from https://github.com/huangzj421/Binaural-WSJ0Mix or you can remove the old version in your data_folder.

I see.. It was working earlier. But, this could be an issue for people who use this recipe in the future. Can you automatically check if the folders are correct, and then if not, you can either automatically fix, or at least you need to give an error message so that people know that they should delete the folder, and create a new one.

@@ -682,13 +709,30 @@ def audio_pipeline_s3(s3_wav):
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Hi @ycemsubakan, I don't know how to check the scripts. The simliest way is to delete this 'if' command. But I think the dataset generation scripts won't change once this PR merged so we don't need to correct it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I am not sure what is the best way to do this check. An easy way might be to include a version tag in the generation script, and in the generated data somewhere. If there is a mismatch, you can return an error, asking the user to recreate the dataset.

@ycemsubakan

Copy link
Copy Markdown
Collaborator

@huangzj421 , all of the .yaml files for me now work. For some reason when I tried with my conda environment, as I mentioned the training was not going down. But with a standard virtual environment it works fine.

I think you can do the version check for the dataset in a separate PR, and if everything is fine with @mravanelli, we can merge.

@huangzj421

Copy link
Copy Markdown
Contributor Author

@huangzj421 , all of the .yaml files for me now work. For some reason when I tried with my conda environment, as I mentioned the training was not going down. But with a standard virtual environment it works fine.

I think you can do the version check for the dataset in a separate PR, and if everything is fine with @mravanelli, we can merge.

That's great, thanks! 'Separate PR' means opening a new PR?

@ycemsubakan

Copy link
Copy Markdown
Collaborator

@huangzj421 , all of the .yaml files for me now work. For some reason when I tried with my conda environment, as I mentioned the training was not going down. But with a standard virtual environment it works fine.
I think you can do the version check for the dataset in a separate PR, and if everything is fine with @mravanelli, we can merge.

That's great, thanks! 'Separate PR' means opening a new PR?

Yes. If you already have a solution for dataset versioning, feel free to push it here. If you think it's going to take time, we can open a new PR, after we merge this one.

@huangzj421

Copy link
Copy Markdown
Contributor Author

@huangzj421 , all of the .yaml files for me now work. For some reason when I tried with my conda environment, as I mentioned the training was not going down. But with a standard virtual environment it works fine.
I think you can do the version check for the dataset in a separate PR, and if everything is fine with @mravanelli, we can merge.

That's great, thanks! 'Separate PR' means opening a new PR?

Yes. If you already have a solution for dataset versioning, feel free to push it here. If you think it's going to take time, we can open a new PR, after we merge this one.

Okay, got it. But some checks of PR failed, how can we merge it?

@ycemsubakan

Copy link
Copy Markdown
Collaborator

@huangzj421 , all of the .yaml files for me now work. For some reason when I tried with my conda environment, as I mentioned the training was not going down. But with a standard virtual environment it works fine.
I think you can do the version check for the dataset in a separate PR, and if everything is fine with @mravanelli, we can merge.

That's great, thanks! 'Separate PR' means opening a new PR?

Yes. If you already have a solution for dataset versioning, feel free to push it here. If you think it's going to take time, we can open a new PR, after we merge this one.

Okay, got it. But some checks of PR failed, how can we merge it?

The checks are failing because of a general problem. It will be fixed soon.

@huangzj421

Copy link
Copy Markdown
Contributor Author

@huangzj421 , all of the .yaml files for me now work. For some reason when I tried with my conda environment, as I mentioned the training was not going down. But with a standard virtual environment it works fine.
I think you can do the version check for the dataset in a separate PR, and if everything is fine with @mravanelli, we can merge.

That's great, thanks! 'Separate PR' means opening a new PR?

Yes. If you already have a solution for dataset versioning, feel free to push it here. If you think it's going to take time, we can open a new PR, after we merge this one.

Okay, got it. But some checks of PR failed, how can we merge it?

The checks are failing because of a general problem. It will be fixed soon.

Okay, thank you!

@huangzj421

Copy link
Copy Markdown
Contributor Author

Hi @mravanelli , do you have time to check this PR? Cem has reviewed it and everything is fine. Thanks.

@mravanelli

mravanelli commented Sep 5, 2022 via email

Copy link
Copy Markdown
Collaborator

@ycemsubakan

Copy link
Copy Markdown
Collaborator

Everything seems fine to me. I ran the code one other time. I did some updates to README. I will merge once the tests pass.

* ConvTasnet-cross.yaml refers to cross-channel features like ILD or IPD are concatenated to the encoder output.
* ConvTasnet-parallel.yaml refers to the proposed multiinput-multi-output (MIMO) TasNet in the original paper [1].
* ConvTasnet-parallel-noise.yaml refers to the above Tasnet applied to 2 speakers with DEMAND noise.
* ConvTasnet-parallel-noise.yaml refers to the above Tasnet applied to 2 speakers with reverberance(RT60) from the [BRIR Sim Set](http://iosr.uk/software/index.php).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you including convtasnet-parallel-noise.yaml two times here? You only have only have one new yaml file..

Also, it would be better to make everything lower case when referencing the yaml files above.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose one of the references should be to convtasnet-parallel-reverb.yaml ?

@@ -682,13 +709,30 @@ def audio_pipeline_s3(s3_wav):
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I am not sure what is the best way to do this check. An easy way might be to include a version tag in the generation script, and in the generated data somewhere. If there is a mismatch, you can return an error, asking the user to recreate the dataset.

@ycemsubakan
ycemsubakan merged commit b1934fa into speechbrain:develop Sep 5, 2022
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

Successfully merging this pull request may close these issues.

3 participants