SarthakYadav / leaf-pytorch

PyTorch implementation of the LEAF audio frontend
64 stars 10 forks source link

dataset processing #7

Closed yunzqq closed 1 year ago

yunzqq commented 1 year ago

where is the data preparation?

yunzqq commented 1 year ago

Your dataset is directly download and read?

yunzqq commented 1 year ago

is the dataset is same as the original LEAF paper?

SarthakYadav commented 1 year ago

Yes, datasets are downloaded and used as is (for VoxCeleb and SpeechCommands).

The only thing needed is preparing .csv files for the different train and validation splits: these files have a "files" and "labels" header corresponding to file name and encoding label.

I will try to add a data preparation script for SpeechCommands, but I can't promise when I'll be able to do that.

In the meanwhile, if you need a full end-to-end sample, including dataset setup and pre-processing, my implementation of LEAF was added to SpeechBrain, and you should visit the official SpeechBrain Speech Command LEAF example. I recommend using the SpeechBrain LEAF implementation because it has better documentation and some minor bugfixes.

yunzqq commented 1 year ago

Yes, datasets are downloaded and used as is (for VoxCeleb and SpeechCommands).

The only thing needed is preparing .csv files for the different train and validation splits: these files have a "files" and "labels" header corresponding to file name and encoding label.

I will try to add a data preparation script for SpeechCommands, but I can't promise when I'll be able to do that.

In the meanwhile, if you need a full end-to-end sample, including dataset setup and pre-processing, my implementation of LEAF was added to SpeechBrain, and you should visit the official SpeechBrain Speech Command LEAF example. I recommend using the SpeechBrain LEAF implementation because it has better documentation and some minor bugfixes.

Thank you very much for your response. And another question is whether the dataset setting is the same as the original LEAF paper? I note some differences in the way of splitting training and validation set.

yunzqq commented 1 year ago

Yes, datasets are downloaded and used as is (for VoxCeleb and SpeechCommands).

The only thing needed is preparing .csv files for the different train and validation splits: these files have a "files" and "labels" header corresponding to file name and encoding label.

I will try to add a data preparation script for SpeechCommands, but I can't promise when I'll be able to do that.

In the meanwhile, if you need a full end-to-end sample, including dataset setup and pre-processing, my implementation of LEAF was added to SpeechBrain, and you should visit the official SpeechBrain Speech Command LEAF example. I recommend using the SpeechBrain LEAF implementation because it has better documentation and some minor bugfixes.

In your implementation, the output (FC) of efficientnet is followed by a sigmoidal function for loss calculation, not softmax, right?

yunzqq commented 1 year ago

Yes, datasets are downloaded and used as is (for VoxCeleb and SpeechCommands).

The only thing needed is preparing .csv files for the different train and validation splits: these files have a "files" and "labels" header corresponding to file name and encoding label.

I will try to add a data preparation script for SpeechCommands, but I can't promise when I'll be able to do that.

In the meanwhile, if you need a full end-to-end sample, including dataset setup and pre-processing, my implementation of LEAF was added to SpeechBrain, and you should visit the official SpeechBrain Speech Command LEAF example. I recommend using the SpeechBrain LEAF implementation because it has better documentation and some minor bugfixes.

Hi, I use the default train validation test split setting, but can not reach the performance. Could I communicate with you about the data processing details?

SarthakYadav commented 1 year ago

Hi @yunzqq

I've rerun experiments on SpeechCommands using the code base, and was easily able to reproduce results reported here. I have also added more info in the README for running experiments.

I recommend you follow the instructions here and use the code base as is, and once you've reproduced the results trace the steps from train.py to make sure all the details are same when you're trying to integrate/reimplement it in your own code base.

Also, LEAF can be sensitive to learning rate schedules, so I recommend using one that's similar to that used in this repo.

I'm closing the issue now since training, given the current recipe, is working as expected.