Datasets:

lewtun HF staff commited on
Commit
50f9e6f
1 Parent(s): 76f7a73

Update README

Browse files
Files changed (2) hide show
  1. README.md +44 -12
  2. gtzan.py +3 -7
README.md CHANGED
@@ -9,7 +9,6 @@ pretty_name: GTZAN
9
  - [Table of Contents](#table-of-contents)
10
  - [Dataset Description](#dataset-description)
11
  - [Dataset Summary](#dataset-summary)
12
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
13
  - [Languages](#languages)
14
  - [Dataset Structure](#dataset-structure)
15
  - [Data Instances](#data-instances)
@@ -36,31 +35,56 @@ pretty_name: GTZAN
36
 
37
  ## Dataset Description
38
 
39
- - **Homepage:** http://marsyas.info/downloads/datasets.html
40
- - **Paper:** http://ismir2001.ismir.net/pdf/tzanetakis.pdf
41
  - **Point of Contact:**
42
 
43
  ### Dataset Summary
44
 
45
- [More Information Needed]
46
-
47
- ### Supported Tasks and Leaderboards
48
-
49
- [More Information Needed]
50
 
51
  ### Languages
52
 
53
- [More Information Needed]
54
 
55
  ## Dataset Structure
56
 
 
 
57
  ### Data Instances
58
 
59
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ### Data Fields
62
 
63
- [More Information Needed]
 
 
 
 
64
 
65
  ### Data Splits
66
 
@@ -122,7 +146,15 @@ pretty_name: GTZAN
122
 
123
  ### Citation Information
124
 
125
- [More Information Needed]
 
 
 
 
 
 
 
 
126
 
127
  ### Contributions
128
 
 
9
  - [Table of Contents](#table-of-contents)
10
  - [Dataset Description](#dataset-description)
11
  - [Dataset Summary](#dataset-summary)
 
12
  - [Languages](#languages)
13
  - [Dataset Structure](#dataset-structure)
14
  - [Data Instances](#data-instances)
 
35
 
36
  ## Dataset Description
37
 
38
+ - **Homepage:** [http://marsyas.info/downloads/datasets.html](http://marsyas.info/downloads/datasets.html)
39
+ - **Paper:** [http://ismir2001.ismir.net/pdf/tzanetakis.pdf](http://ismir2001.ismir.net/pdf/tzanetakis.pdf)
40
  - **Point of Contact:**
41
 
42
  ### Dataset Summary
43
 
44
+ GTZAN is a dataset for musical genre classification of audio signals. The dataset consists of 1,000 audio tracks, each of 30 seconds long. It contains 10 genres, each represented by 100 tracks. The tracks are all 22,050Hz Mono 16-bit audio files in WAV format. The genres are: blues, classical, country, disco, hiphop, jazz, metal, pop, reggae, and rock.
 
 
 
 
45
 
46
  ### Languages
47
 
48
+ English
49
 
50
  ## Dataset Structure
51
 
52
+ GTZAN is distributed as a single dataset without a predefined training and test split. The information below refers to the single `train` split that is assigned by default.
53
+
54
  ### Data Instances
55
 
56
+ An example of GTZAN looks as follows:
57
+
58
+ ```python
59
+ {
60
+ "file": "/path/to/cache/genres/blues/blues.00000.wav",
61
+ "audio": {
62
+ "path": "/path/to/cache/genres/blues/blues.00000.wav",
63
+ "array": array(
64
+ [
65
+ 0.00732422,
66
+ 0.01660156,
67
+ 0.00762939,
68
+ ...,
69
+ -0.05560303,
70
+ -0.06106567,
71
+ -0.06417847,
72
+ ],
73
+ dtype=float32,
74
+ ),
75
+ "sampling_rate": 22050,
76
+ },
77
+ "genre": 0,
78
+ }
79
+ ```
80
 
81
  ### Data Fields
82
 
83
+ The types associated with each of the data fields is as follows:
84
+
85
+ * `file`: a `string` feature.
86
+ * `audio`: an `Audio` feature containing the `path` of the sound file, the decoded waveform in the `array` field, and the `sampling_rate`.
87
+ * `genre`: a `ClassLabel` feature.
88
 
89
  ### Data Splits
90
 
 
146
 
147
  ### Citation Information
148
 
149
+ ```
150
+ @misc{tzanetakis_essl_cook_2001,
151
+ author = "Tzanetakis, George and Essl, Georg and Cook, Perry",
152
+ title = "Automatic Musical Genre Classification Of Audio Signals",
153
+ url = "http://ismir2001.ismir.net/pdf/tzanetakis.pdf",
154
+ publisher = "The International Society for Music Information Retrieval",
155
+ year = "2001"
156
+ }
157
+ ```
158
 
159
  ### Contributions
160
 
gtzan.py CHANGED
@@ -11,13 +11,9 @@
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
  # See the License for the specific language governing permissions and
13
  # limitations under the License.
14
- # TODO: Address all TODOs and remove all explanatory comments
15
- """TODO: Add a description here."""
16
 
17
 
18
- import csv
19
- import json
20
- import os
21
  from pathlib import Path
22
 
23
  import datasets
@@ -35,7 +31,7 @@ year = "2001"
35
 
36
 
37
  _DESCRIPTION = """\
38
- GTZAN is a dataset for musical genre classification of audio signals. The dataset consists of 1,000 audio tracks, each of 30 seconds long. It contains 10 genres, each represented by 100 tracks. The tracks are all 22,050Hz Mono 16-bit audio files in .wav format. The genres are: blues, classical, country, disco, hiphop, jazz, metal, pop, reggae, and rock.
39
  """
40
 
41
  _HOMEPAGE = "http://marsyas.info/downloads/datasets.html"
@@ -50,7 +46,7 @@ CORRUPTED_FILES = ["jazz.00054.wav"]
50
 
51
 
52
  class Gtzan(datasets.GeneratorBasedBuilder):
53
- """TODO: Short description of my dataset."""
54
 
55
  def _info(self):
56
  return datasets.DatasetInfo(
 
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
  # See the License for the specific language governing permissions and
13
  # limitations under the License.
14
+ """The GTZAN dataset."""
 
15
 
16
 
 
 
 
17
  from pathlib import Path
18
 
19
  import datasets
 
31
 
32
 
33
  _DESCRIPTION = """\
34
+ GTZAN is a dataset for musical genre classification of audio signals. The dataset consists of 1,000 audio tracks, each of 30 seconds long. It contains 10 genres, each represented by 100 tracks. The tracks are all 22,050Hz Mono 16-bit audio files in WAV format. The genres are: blues, classical, country, disco, hiphop, jazz, metal, pop, reggae, and rock.
35
  """
36
 
37
  _HOMEPAGE = "http://marsyas.info/downloads/datasets.html"
 
46
 
47
 
48
  class Gtzan(datasets.GeneratorBasedBuilder):
49
+ """The GTZAn dataset"""
50
 
51
  def _info(self):
52
  return datasets.DatasetInfo(