inatspectro-bioacoustics
收藏资源简介:
iNatSpectro Bioacoustics是一个由社区贡献的生物声学频谱图数据集,数据来源于研究级的iNaturalist音频观测记录。数据集通过iNatSpectro浏览器扩展创建,该工具可在浏览器中直接渲染频谱图,并允许用户提交底层的浮点数据用于机器学习训练。每个数据条目对应一个iNaturalist音频文件,包含由iNatSpectro在浏览器中计算得到的频谱图原始浮点数据以及观测元数据。条目可能包含两种标签类型:强标签(标注了物种叫声出现的时间/频率边界框)或弱标签(已知物种存在于音频中,但未标注具体位置)。数据集采用追加式存储,每个贡献存储为一个独立的NDJSON文件。数据集结构包含丰富的字段,如观测ID、文件ID、物种通用名和学名、分类群组、原始音频URL、音频采样率和时长、频谱图分析参数(如使用的分析配置文件、FFT大小、频率范围、缩放模式、动态范围归一化参数)、固定的频谱图维度(256个时间列×128个频率仓)、频谱图数据数组(32,768个浮点数,以列主序存储)、标注信息(时间起始/结束、频率低/高边界)、贡献者iNaturalist用户名(可选)以及贡献时间戳。数据集适用于音频分类、物种识别、生物声学事件检测等机器学习任务,特别适合用于训练和评估基于频谱图的生物声学模型。
iNatSpectro Bioacoustics is a community-contributed bioacoustic spectrogram dataset sourced from research-grade iNaturalist audio observations. The dataset is created via the iNatSpectro browser extension, which renders spectrograms directly in the browser and allows users to submit underlying floating-point data for machine learning training. Each data entry corresponds to an iNaturalist audio file and includes raw spectrogram floating-point data computed in-browser by iNatSpectro, along with observation metadata. Entries may contain two types of labels: strong labels (with time/frequency bounding boxes annotating species vocalizations) or weak labels (where species are known to be present in the audio but without specific location annotations). The dataset is stored in an append-only manner, with each contribution saved as a separate NDJSON file. The dataset structure includes rich fields such as observation ID, file ID, species common and scientific names, taxon group, original audio URL, audio sample rate and duration, spectrogram analysis parameters (e.g., analysis profile used, FFT size, frequency range, scaling mode, dynamic range normalization parameters), fixed spectrogram dimensions (256 time columns × 128 frequency bins), spectrogram data array (32,768 floating-point numbers stored in column-major order), annotation information (time start/end, frequency low/high bounds), contributor iNaturalist username (optional), and contribution timestamp. The dataset is suitable for machine learning tasks like audio classification, species identification, and bioacoustic event detection, particularly for training and evaluating spectrogram-based bioacoustic models.
数据集概要
- 数据集名称: iNatSpectro Bioacoustics
- 许可证: CC BY 4.0
- 任务类别: 音频分类
- 标签: 生物声学、声谱图、野生动物、公民科学、iNaturalist
- 数据集大小: 少于 1000 条(n<1K)
- 配置: 默认配置(
default),数据以 NDJSON 格式存储在data/*.ndjson路径下
数据来源
数据源自 iNaturalist 全球公民科学平台上的研究级(research-grade)音频观察记录。贡献者通过 iNatSpectro 浏览器扩展在本地浏览器中生成声谱图,并将浮点数据与观察元数据提交至该数据集。
数据集结构
每条记录对应一个 iNaturalist 音频文件,存储为独立的 NDJSON 文件,文件命名格式为 data/{observation_id}_{file_id}_{unix_timestamp_ms}.ndjson。文件内容为单个 JSON 对象,包含以下字段:
| 字段 | 类型 | 描述 |
|---|---|---|
observation_id |
string | iNaturalist 观察 ID |
file_id |
string | null |
common_name |
string | null |
scientific_name |
string | null |
iconic_taxon_name |
string | null |
audio_url |
string | iNaturalist 上的源音频 URL |
sample_rate |
number | 源音频采样率(Hz) |
duration |
number | 源音频时长(秒) |
profile |
string | iNatSpectro 分析配置文件(如 "Bat") |
nfft |
number | null |
min_freq |
number | 显示的最低频率(Hz) |
max_freq |
number | 显示的最高频率(Hz) |
scale_mode |
string | 频率轴刻度:"mel"、"log" 或 "linear" |
dyn_min |
number | 归一化下限(dB) |
dyn_max |
number | 归一化上限(dB) |
spec_columns |
number | 时间列数(固定为 256) |
spec_bins |
number | 频率箱数(固定为 128) |
spec_data |
number[] | 32,768 个浮点数组成的声谱图数据(列主序存储) |
annotation |
object | null |
inat_username |
string | null |
contributed_at |
string | ISO 8601 格式的贡献时间戳 |
声谱图数据(spec_data)布局
spec_data是一维展平数组,包含 32,768 个原始 FFT 幅度值(dB 刻度),按列主序(时间 × 频率)排列。- 时间列数:256,频率箱数:128。
- 索引方式:
i = col * 128 + bin,其中bin=0对应最高频率(max_freq),bin=127对应最低频率(min_freq)。
- 可通过
dyn_min和dyn_max将值归一化到 [0, 1] 区间。
重构为二维数组(Python 示例): python import numpy as np spec = np.array(entry["spec_data"]).reshape(256, 128) # shape: (time, freq)
归一化到 [0, 1]: python spec_norm = (spec - entry["dyn_min"]) / (entry["dyn_max"] - entry["dyn_min"]) spec_norm = np.clip(spec_norm, 0, 1)
标签类型
-
强标签(Strong label):
annotation字段非null,包含一个时间/频率边界框,精确标示物种叫声出现的位置。字段结构如下: json { "time_start": 1.2, "time_end": 2.8, "freq_low": 15000, "freq_high": 80000 }- 时间值单位为秒,频率值单位为 Hz。
-
弱标签(Weak label):
annotation字段为null,表示物种确认存在于音频中但未标注具体位置。
使用示例
加载数据集: python from datasets import load_dataset ds = load_dataset("japht/inatspectro-bioacoustics", split="train")
按记录去重(保留每个观察+音频文件的最新贡献): python import pandas as pd df = ds.to_pandas() df = df.sort_values("contributed_at").drop_duplicates(subset=["observation_id", "file_id"], keep="last")
仅筛选强标签数据: python strong = ds.filter(lambda x: x["annotation"] is not None)
贡献方式
通过 iNatSpectro 浏览器扩展进行贡献。打开任意包含音频的研究级 iNaturalist 观察记录,渲染声谱图后点击 Contribute 即可提交。数据集为仅追加模式。




