gagannarula commited on
Commit
7d5d4c2
·
verified ·
1 Parent(s): 5f9de45

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +164 -0
README.md ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ task_categories:
4
+ - audio-classification
5
+ language:
6
+ - en
7
+ tags:
8
+ - biology
9
+ - bioacoustics
10
+ - audio-classification
11
+ - multimodal
12
+ - Audio-Text-to-Text
13
+ pretty_name: NatureLM-audio-training
14
+ size_categories:
15
+ - 10M<n<100M
16
+ configs:
17
+ - config_name: NatureLM-audio-training
18
+ features:
19
+ - name: file_name
20
+ dtype: string
21
+ - name: metadata
22
+ dtype: string
23
+ - name: audio
24
+ dtype:
25
+ audio:
26
+ sample_rate: 16000
27
+ decode: false
28
+ - name: source_dataset
29
+ dtype: string
30
+ - name: id
31
+ dtype: string
32
+ - name: license
33
+ dtype: string
34
+ - name: instruction
35
+ dtype: string
36
+ - name: instruction_text
37
+ dtype: string
38
+ - name: output
39
+ dtype: string
40
+ - name: task
41
+ dtype: string
42
+ data_files:
43
+ - split: train
44
+ path: shard*
45
+
46
+ ---
47
+
48
+ # NatureLM-audio-training
49
+
50
+ **Version:** 0.1.0
51
+ **Created on:** 2025-05-15
52
+ **Creators:**
53
+ - EarthSpeciesProject (https://www.earthspecies.org)
54
+
55
+ ## Overview
56
+
57
+ NatureLM-audio-training is a large and diverse **audio-language dataset** designed for training bioacoustic models that can generate a natural language answer to a natural language query on a reference bioacoustic audio recording. For example, for an audio recording of a focal bird species in the wild, a relevant query might be "What is the common name for the focal species in the audio? Answer:" to which a audio+text bioacoustic model trained on this dataset may respond with "Humpback Whale". Introduced in the paper [NATURELM-AUDIO: AN AUDIO-LANGUAGE FOUNDATION MODEL FOR BIOACOUSTICS](https://arxiv.org/pdf/2411.07186), this dataset aggregates data from sources such as Xeno-canto, iNaturalist, Animal Sound Archive amongst others. The accompanying model trained on this dataset can be found here [EarthSpeciesProject/NatureLM-audio](https://huggingface.co/EarthSpeciesProject/NatureLM-audio).
58
+
59
+ ## Usage
60
+ ```python
61
+ from datasets import load_dataset
62
+
63
+ dataset = load_dataset("EarthSpeciesProject/NatureLM-audio-training", split="train")
64
+ print(dataset)
65
+ ```
66
+
67
+ ## Example data
68
+ ```python
69
+ import numpy as np
70
+
71
+ x = ds[0]
72
+ audio = np.array(x["audio"])
73
+ print(audio.shape)
74
+ # (503808,)
75
+
76
+ print(x["instruction"])
77
+ # '<Audio><AudioHere></Audio> What is the taxonomic name of the focal species in the audio?'
78
+
79
+ print(x["output"])
80
+ # 'Chordata Aves Passeriformes Passerellidae Atlapetes fuscoolivaceus'
81
+
82
+ print(x["task"])
83
+ # 'taxonomic-classification'
84
+
85
+ import json
86
+ metadata = json.loads(x["metadata"])
87
+ print(metadata)
88
+ # {'recordist': 'Peter Boesman',
89
+ # 'url': 'https://xeno-canto.org/sounds/uploaded/OOECIWCSWV/XC693334-LS_58842%20Dusky-headed%20brushfinch%20song%20B.mp3',
90
+ # 'source': 'Xeno-canto',
91
+ # 'duration': 31.488,
92
+ # 'class': 'Aves',
93
+ # 'family': 'Passerellidae',
94
+ # 'genus': 'Atlapetes',
95
+ # 'species': 'Atlapetes fuscoolivaceus',
96
+ # 'phylum': 'Chordata',
97
+ # 'order': 'Passeriformes',
98
+ # 'subspecies': '',
99
+ # 'data_category': 'animal',
100
+ # 'text': None,
101
+ # 'sample_rate': 16000}
102
+ ```
103
+
104
+ ## Dataset Composition
105
+
106
+ NatureLM-audio-training combines data from several well-known sources. There are a total of 26,440,512 samples (examples).
107
+ The data are organized in shards of 2500 samples each, each containing a subset of the total dataset. We additionally provide an `annotations.jsonl` file that contains taxonomic information for each sample, including family, genus, species, common name, and other relevant metadata. This file can be used to perform queries on the dataset to create data mixes as desired by the user. The `id` column of the `annotations.jsonl` file matches the `id` field in the dataset, and the shard-id of the corresponding sample is in the `shard_id` column.
108
+
109
+
110
+ ## Tasks and Applications
111
+
112
+ Several different types of bioacoustically relevant tasks are included in the dataset. The tasks are designed to be flexible and can be used for a variety of applications, including (but not limited to):
113
+ - *taxonomic-classification*
114
+ - *species-sci-detection-hard*
115
+ - *genus-detection*
116
+ - *call-type*
117
+ - *caption-scientific-rich*
118
+ - *open-ended question*
119
+ - *call-type-with-common-name*
120
+ - *lifestage-with-common-name*
121
+ ...
122
+
123
+ These tasks are particularly useful for exploring zero-shot learning applications in bioacoustics.
124
+
125
+ ## Data Fields
126
+ The following fields are present in each example:
127
+ - `source_dataset` (str): One of the source datasets mentioned above
128
+ - `audio` (Audio): The audio data in float32 format.
129
+ - `id` (str): Sample uuid.
130
+ - `metadata` (str): Each sample can have some extra data such as the url of the original audio, the recordist, duration,
131
+ sample_rate and taxonomic information such as family, genus, species, common name, etc. The metadata is a JSON string.
132
+ - `file_name` (str): Sample file_name
133
+ - `instruction` (str): A prompt (a query) corresponding to the audio for your audio-text model with a placeholder for audio tokens. E.g. '<Audio><AudioHere></Audio> What is the scientific name for the focal species in the audio?'
134
+ - `instruction_text` (str): Same as `instruction` but without the placeholder for audio tokens.
135
+ - `output` (str): The expected output from the model
136
+ - `task` (str): The task type e.g. 'taxonomic-classification', 'caption-common', 'lifestage', 'speech-nspeakers'
137
+ - `license` (str): The license of the dataset. For example, 'CC-BY-NC' or 'CC0'.
138
+
139
+ ## Licensing
140
+
141
+ Due to its composite nature, `NatureLM-audio-training` is subject to multiple licenses. Individual samples have the "license" field indicating the specific license for that sample. The dataset is not intended for commercial use, and users should adhere to the licenses of the individual datasets.
142
+
143
+ ## Citation
144
+
145
+ If you use NatureLM-audio-training, please cite the following:
146
+
147
+ ```bibtex
148
+ @misc{naturelm-audio,
149
+ title={NATURELM-AUDIO: AN AUDIO-LANGUAGE FOUNDATION MODEL FOR BIOACOUSTICS},
150
+ url={https://arxiv.org/pdf/2411.07186},
151
+ note={Preprint},
152
+ year={2024}
153
+ }
154
+ ```
155
+
156
+
157
+ ## Contact
158
+
159
+ For questions, comments, or contributions, please contact:
160
+ - D. Robinson (david at earthspecies dot org)
161
+ - M. Hagiwara (masato at earthspecies dot org)
162
+ - M. Miron (marius at earthspecies dot org)
163
+ - G. Narula (gagan at earthspecies dot org)
164
+ - M. Alizadeh (milad at earthspecies dot org)