sharathadavanne / seld-dcase2019

Benchmark for sound event localization task of DCASE 2019 challenge
Other
71 stars 29 forks source link

How to import a custom set data? #1

Closed Qinstudy closed 5 years ago

Qinstudy commented 5 years ago

Hello @sharathadavanne ! I customized a dataset. The format of the dataset is given in terms of metadata and audio data. I run the batch_feature_extraction.py file and successfully get the tag file and the feature file. But when I run seld.py, I get the following error: C:\Users\User\Anaconda3\python.exe D:/seld-dcase2019/seld-dcase2019-master/seld.py Using TensorFlow backend. Traceback (most recent call last): File "D:/seld-dcase2019/seld-dcase2019-master/seld.py", line 319, in sys.exit(main(sys.argv)) File "D:/seld-dcase2019/seld-dcase2019-master/seld.py", line 133, in main seq_len=params['sequence_length'], feat_label_dir=params['feat_label_dir'] File "D:\seld-dcase2019\seld-dcase2019-master\cls_data_generator.py", line 39, in init self._get_filenames_list_and_feat_label_sizes() File "D:\seld-dcase2019\seld-dcase2019-master\cls_data_generator.py", line 94, in _get_filenames_list_and_feat_label_sizes temp_feat = np.load(os.path.join(self._feat_dir, self._filenames_list[0])) IndexError: list index out of range

Tracking the error, I found the error location (cls_data_generator.py), the following line: self._filenames_list = list() Https://github.com/sharathadavanne/seld-dcase2019/blob/b2031ddd67a50d533074d8a379a0ef03ae86b4dd/cls_data_generator.py#L28 I think the reason is that the list is empty and has no elements, so doing list[0] will cause this error. Can you explain the meaning of the code of self._filenames_list = list() in cls_data_generator.py? Thank you !

sharathadavanne commented 5 years ago

Hi @Qinstudy make sure the parser in this function is reading your filenames correctly. The parser has been made specifically for the DCASE 2019 dataset. This parser fills the self._filenames_list with your dataset filenames.

Qinstudy commented 5 years ago

@sharathadavanne thank you for your tips!When using a custom dataset, I only used two sound categories (speech and phone). When executing seld.py, the command line reports an error: IndexError: list index out of range.The details as follows: Https://github.com/sharathadavanne/seld-dcase2019/blob/b2031ddd67a50d533074d8a379a0ef03ae86b4dd/seld.py#L280 I want to know the custom data set, the sound category must also be 11 categories as your paper? Are there any other requirements, such as the number of microphone channels, sampling frequency, and audio file time?

sharathadavanne commented 5 years ago

All the parameters related to the dataset can be set here.

But the error you seem to be getting is still related to the reading the filenames corresponding to training and testing split. Check if this line has the list of all the testing files from your dataset. If not, then you will have to fix the parser function to read appropriately.

Qinstudy commented 5 years ago

Thanks,I will try to find the error.