---
title: NSynth-100
canonical_url: "https://www.modelscope.cn/datasets/pp199124903/NSynth-100"
md_url: "https://www.modelscope.cn/datasets/pp199124903/NSynth-100.md"
repository: pp199124903/NSynth-100
chinese_name: NSynth_fscil
last_updated: 2026-11-04
license: "Apache License 2.0"
storage_size: "24 GB"
domain:
  - task
tasks:
  - "Few-shot Class-incremental Audio Classification"
downloads: 879
stars: 1
---

# NSynth-100

> NSynth-100 - pp199124903 在 ModelScope 开源的数据集。% - 2022.05.25 by Chester.W.Xie - ASVP@SCUT The NSynth Dataset is a dataset for musical instrument identification. The dataset contains 305,979 samples (musical notes), each with a unique pitch, timbre, and…

pp199124903/NSynth-100 是 ModelScope 魔搭社区上的Few-shot Class-incremental Audio Classification数据集，涉及 task 领域，存储大小 24 GB，采用 Apache License 2.0 许可。

- **Repository**: pp199124903/NSynth-100
- **License**: Apache License 2.0
- **Tasks**: Few-shot Class-incremental Audio Classification
- **Domain**: task
- **Storage size**: 24 GB
- **Downloads**: 879
- **Stars**: 1
- **Last updated**: 2026-11-04

Source: https://www.modelscope.cn/datasets/pp199124903/NSynth-100

---

### Clone with HTTP
```bash
git clone https://www.modelscope.cn/datasets/pp199124903/NSynth-100.git
```
% - 2022.05.25 by Chester.W.Xie - ASVP@SCUT
- [The NSynth Dataset](https://magenta.tensorflow.org/datasets/nsynth) is a dataset for musical instrument identification.
- The dataset contains 305,979 samples (musical notes), each with a unique pitch, timbre, and envelope. Each sample has a unique pitch, timbre, and envelope.
samples were generated from 1006 musical instruments. The duration of the samples is standardized at 4 seconds and the sampling rate is standardized at 16K Hz. 
➢ The dataset has been divided into three subsets:
- The training set has 953 classes, totaling 289,205 samples. The training set has 953 categories with a total of 289,205 samples. The maximum number of samples within a category is 440, the minimum is 30, and the average is 303;
- The validation set has 53 categories, totaling 12,678 samples. Maximum number of samples within a class: 348, minimum 83, average 239;
- The test set has 53 categories with a total of 4096 samples. Maximum number of samples within a class: 125, minimum 22, average 125;
- The validation set and test set have the same categories, while the training set does not overlap with the validation/test set categories.
➢ Statistics on number of samples after validation and test sets are combined.
- Number of categories with >100 samples: 53
- Number of categories with >150 samples: 52
- Number of categories with >200 samples: 45
- Number of categories with more than 250 samples: 32
- Number of categories with >300 samples: 31

Counting the samples in the training set

- Number of categories with >450 samples: 0
- Number of categories with >440 samples: 377
- Number of categories with more than 400 samples: 382
➢ Based on the above statistics, we can have the following options for reorganizing the dataset:

#### setup 1 (NSynth-100-FS).
After merging the test set and validation set, keep those 45 classes that have greater than 200 samples as new classes, and then keep 200 samples per class uniformly. \
Then further divide the 200 samples in each class in half into the training set and the test set;\
From the 382 classes in the training set, 55 classes are taken as the base class and 400 samples in each class are retained, and further divided randomly into training, validation and test sets by 2:1:1

#### setup 2 (NSynth-200-FS).
The training and test sets of the new classes are kept the same as setup 1. \
From the 382 classes in the training set, 155 classes are taken as the base class, 400 samples are kept for each class, and further divided into training, validation and test sets randomly by 2:1:1.

#### setup 3 (NSynth-300-FS).
The training set and test set for the new classes are kept the same as setup 1\
From the 382 classes in the training set, 255 classes are taken as the base class, 400 samples are reserved for each class, and further divided into training, validation and test sets randomly by 2:1:1.

#### setup 4 (NSynth-400-FS).
The training set and test set for the new classes are kept the same as setup 1 \
355 categories are extracted from the 382 categories of the training set as the base category, 400 samples are kept for each category, and further divided into training, validation and test sets randomly by 2:1:1



Our reorganization strategy:
- Keep the original audio sample catalog structure unchanged;
- The original meta files are filtered accordingly to obtain the meta files corresponding to the four settings;
- According to the new meta file information, read the corresponding data from the original sample catalog.

Please cite the following papers when you use the datasets in your work. 

[1] Y. Li, W. Cao, W. Xie, J. Li and E. Benetos, "Few-Shot Class-Incremental Audio Classification Using Dynamically Expanded Classifier With Self-Attention Modified Prototypes," in IEEE Transactions on Multimedia, vol. 26, pp. 1346-1360, 2024, doi: 10.1109/TMM.2023.3280011.

[2] W. Xie, Y. Li, Q. He, W.g Cao, Few-shot class-incremental audio classification via discriminative prototype learning, Expert Systems With Applications, 2023, vol. 225, 120044, pp. 1-13. 

[3] W. Xie, Y. Li, Q. He, W. Cao, T. Virtanen, Few-shot class-incremental audio classification using adaptively-refined prototypes, INTERSPEECH, 2023, pp. 301-305. online: https://www.isca-speech.org/archive/interspeech_2023/xie23b_interspeech.html 

[4] Y. Li, W. Cao, J. Li, W. Xie, Q. He, Few-shot class-incremental audio classification using stochastic classifier, INTERSPEECH, 2023, pp. 4174-4178. online: https://www.isca-speech.org/archive/interspeech_2023/li23w_interspeech.html

[5] Y. Li, J. Li, Y. Si, J. Tan and Q. He, "Few-Shot Class-Incremental Audio Classification With Adaptive Mitigation of Forgetting and Overfitting," in IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 32, pp. 2297-2311, 2024, doi: 10.1109/TASLP.2024.3385287.

The following ASCII diagram depicts the directory structure:
<pre>
dataset_root
├── nsynth-100-fs-meta
│    ├── nsynth-100-fs_train.csv # containing information of all training samples from the base and novel classes
│    ├── nsynth-100-fs_val.csv  #　containing information of all validation samples from the base classes
│    ├── nsynth-100-fs_test.csv　# containing information of all test samples from the old and novel classes
│    └── nsynth-100-fs_vocab.json 　# label vocabulary of the dataset
│    
├── nsynth-200-fs-meta
│    ├── nsynth-200-fs_train.csv #
│    ├── nsynth-200-fs_val.csv
│    ├── nsynth-200-fs_test.csv
│    └── nsynth-200-fs_vocab.json
│    
├── nsynth-300-fs-meta
│    ├── nsynth-300-fs_train.csv # 
│    ├── nsynth-300-fs_val.csv
│    ├── nsynth-300-fs_test.csv
│    └── nsynth-300-fs_vocab.json
│       
├── nsynth-400-fs-meta
│    ├── nsynth-400-fs_train.csv # 
│    ├── nsynth-400-fs_val.csv
│    ├── nsynth-400-fs_test.csv
│    └── nsynth-400-fs_vocab.json
│    
├── nsynth-train　 # Original training set for the Nsynth dataset
│    ├── audio
│    |    ├── bass_acoustic_000-024-025.wav
│    |    └── ....
│    └── examples.json  # The original meta information file
│
├── nsynth-val  # The original validation set for the Nsynth dataset
│    ├── audio
│    |    ├── bass_electronic_018-022-025.wav
│    |    └── ....
│    └── examples.json
│
└── nsynth-test # The original test set for the Nsynth dataset
     ├── audio
     |    ├── bass_electronic_018-022-100.wav
     |    └── ....
     └── examples.json
</pre>

Each of the above csv files is uniformly formatted as follows:
``
                           filename instrument instrument_family instrument_source audio_source
0 guitar_electronic_017-088-075 guitar_electronic_017 guitar electronic nsynth-train
1 guitar_electronic_017-088-127 guitar_electronic_017 guitar electronic nsynth-train
```
The filename with .wav extension is the complete sample name, the instrument is the label of the corresponding sample, instrument_family and instrument_source are not needed. \
audio_source represents the folder where the sample is stored, so you can read the audio sample according to the following path format:
``
 meta_info = pd.read_csv(...)
 path = os.path.join('/data/datasets/The_NSynth_Dataset', meta_info[audio_source][i], meta_info[filename][i] + '.wav') 
```

 It is important to note that all the above reorganized meta files are randomly filtered, and in general, the file information will be different every time you run the filtering program. \
 Therefore, to be on the safe side, please copy the meta folder of the above 4 settings to your own project directory, and the audio data can be copied without copying, because it will be the same when you re-download it.

Below we provide a rudimentary script to show how to read the data according to the different settings:\
First copy the script file /data/datasets/The_NSynth_Dataset/load_nsynth_data.py to your own project directory, then run

``
python load_nsynth_data.py --metapath /data/datasets/The_NSynth_Dataset --audiopath /data/datasets/The_NSynth_Dataset --num_class 100 -- base_class 55

If you want to download this dataset, first download all the metadata sections. For the data file part, the NSynth_fscil dataset is compressed in a split-volume package using the following command:
```
tar cvzf - DATASET_PATH | split -b 3000m -d - DATASET_NAME.tar.gz
```
The steps to unzip a split volume are as follows:
```
cat DATASET_NAME.tar.gz* > DATASET_NAME.tar.gz
tar xvzf DATASET_NAME.tar.gz
```

---metapath can be changed to the path where you save nsynth-100-fs-meta/nsynth-200-fs-meta ... The path to the 4 folders
--audiopath is the path where you keep the original nsynth dataset, this path is public, usually you don't need to change it.

For different set of dataset, just change the variable --num_class 100/200/300/400, the program will automatically read the corresponding meta file and load the corresponding data. \
At the same time, you need to change the variable --base_class 55/155/255/355 to correspond to the total number of categories of the base class in different cases.

By default, the program reads the audio samples online and converts them to fbank features directly. If you need to use other time-frequency features, you just need to modify them in wave_to_tfr function.
At the same time, you can also add feature normalization, spectral enhancement and other operations in this function.

# Enjoy the data and code!
