Datasets:
mb23
/

Languages:
English
License:
mickylan2367 commited on
Commit
8779c37
·
1 Parent(s): 5973fe6

Update README

Browse files
Files changed (1) hide show
  1. README.md +20 -19
README.md CHANGED
@@ -9,9 +9,9 @@ size_categories:
9
  - 10K<n<100K
10
  ---
11
 
12
- ## Google/MusicCapsをスペクトログラムにしたデータ。
13
 
14
- ### データの基本情報
15
  <table>
16
  <thead>
17
  <td>画像</td>
@@ -29,7 +29,7 @@ size_categories:
29
  </tbody>
30
  </table>
31
 
32
- ### How this dataset was made
33
 
34
  * コード:https://colab.research.google.com/drive/13m792FEoXszj72viZuBtusYRUL1z6Cu2?usp=sharing
35
  * 参考にしたKaggle Notebook : https://www.kaggle.com/code/osanseviero/musiccaps-explorer
@@ -48,10 +48,24 @@ image = Image.fromarray(np.uint8(D), mode='L') # 'L'は1チャンネルのグ
48
  image.save('spectrogram_{}.png')
49
  ```
50
 
51
- ## How to use this
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  * <font color="red">Subset <b>data 1300-1600</b> and <b>data 3400-3600</b> are not working now, so please get subset_name_list</n>
53
  those were removed first</font>.
54
- ### get information about this dataset:
55
  ```python
56
  # Extract dataset's information using huggingface API
57
  import requests
@@ -107,7 +121,7 @@ return subset name list. for example,
107
  ```
108
 
109
 
110
- ### load dataset and change to dataloader:
111
  * You can use the code below:
112
  * <font color="red">...but (;・∀・)I don't know whether this code works efficiently, because I haven't tried this code so far</color>
113
  ```python
@@ -181,16 +195,3 @@ def load_datasets():
181
  train_loader, test_loader = load_datasets()
182
  ```
183
 
184
- ### Recover music(wave form) from sprctrogram
185
- ```python
186
- im = Image.open("pngファイル")
187
- db_ud = np.uint8(np.array(im))
188
- amp = librosa.db_to_amplitude(db_ud)
189
- print(amp.shape)
190
- # (1025, 861)は20秒のwavファイルをスペクトログラムにした場合
191
- # (1025, 431)は10秒のwavファイルをスペクトログラムにした場合
192
- # (1025, 216)は5秒のwavファイルをスペクトログラムにした場合
193
-
194
- y_inv = librosa.griffinlim(amp*200)
195
- display(IPython.display.Audio(y_inv, rate=sr))
196
- ```
 
9
  - 10K<n<100K
10
  ---
11
 
12
+ # Google/MusicCapsをスペクトログラムにしたデータ。
13
 
14
+ ## Dataset information
15
  <table>
16
  <thead>
17
  <td>画像</td>
 
29
  </tbody>
30
  </table>
31
 
32
+ ## How this dataset was made
33
 
34
  * コード:https://colab.research.google.com/drive/13m792FEoXszj72viZuBtusYRUL1z6Cu2?usp=sharing
35
  * 参考にしたKaggle Notebook : https://www.kaggle.com/code/osanseviero/musiccaps-explorer
 
48
  image.save('spectrogram_{}.png')
49
  ```
50
 
51
+ ## Recover music(wave form) from sprctrogram
52
+ ```python
53
+ im = Image.open("pngファイル")
54
+ db_ud = np.uint8(np.array(im))
55
+ amp = librosa.db_to_amplitude(db_ud)
56
+ print(amp.shape)
57
+ # (1025, 861)は20秒のwavファイルをスペクトログラムにした場合
58
+ # (1025, 431)は10秒のwavファイルをスペクトログラムにした場合
59
+ # (1025, 216)は5秒のwavファイルをスペクトログラムにした場合
60
+
61
+ y_inv = librosa.griffinlim(amp*200)
62
+ display(IPython.display.Audio(y_inv, rate=sr))
63
+ ```
64
+
65
+ ## Example : How to use this
66
  * <font color="red">Subset <b>data 1300-1600</b> and <b>data 3400-3600</b> are not working now, so please get subset_name_list</n>
67
  those were removed first</font>.
68
+ ### 1 : get information about this dataset:
69
  ```python
70
  # Extract dataset's information using huggingface API
71
  import requests
 
121
  ```
122
 
123
 
124
+ ### 2 : load dataset and change to dataloader:
125
  * You can use the code below:
126
  * <font color="red">...but (;・∀・)I don't know whether this code works efficiently, because I haven't tried this code so far</color>
127
  ```python
 
195
  train_loader, test_loader = load_datasets()
196
  ```
197