Audio-WestlakeU / NBSS

The official repo of NBC & SpatialNet for multichannel speech separation, denoising, and dereverberation
MIT License
175 stars 21 forks source link

How to use custom dataset with SpatialNet #17

Open abnera1 opened 9 months ago

abnera1 commented 9 months ago

This is an interesting project, and I am very interested. I am having trouble understanding how to effectively use custom dataset with SpatialNet. Can you guide me on: How to properly format and prepare my custom dataset for use with this project? What are the best practices for importing and integrating the custom dataset into the project? Are there any specific steps or configurations needed to make the project compatible with my custom dataset? Thank you!

quancs commented 9 months ago

How to properly format and prepare my custom dataset for use with this project?

You can implement your own datamodule by taking this data_loaders/sms_wsj_plus.py as an example.

What are the best practices for importing and integrating the custom dataset into the project?

Create a datamodule like data_loaders/sms_wsj_plus.py, then write your config for your datamodule following https://github.com/Audio-WestlakeU/NBSS/blob/main/configs/datasets/sms_wsj_plus.yaml, lastly you can use the your datamodule by specifying your config in the command line.

Are there any specific steps or configurations needed to make the project compatible with my custom dataset?

Your datasets are required to return an item in this format https://github.com/Audio-WestlakeU/NBSS/blob/af61ac423d09aab3a5489d225b1530e541b71a16/data_loaders/sms_wsj_plus.py#L239C42-L239C42

You can debug the data_loaders/sms_wsj_plus.py to see the shapes of each tensor, and you can also obtain the wavs in the dataset when you run this file.

quancs commented 9 months ago

The datamodules in data_loaders and their corresponding config files in configs/datasets can all be taken as examples