Datasets:
File size: 9,074 Bytes
16a6ff3 7dd57b0 16a6ff3 7dd57b0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | ---
license: cc-by-sa-4.0
task_categories:
- audio-classification
pretty_name: Engine Sound Windows (YouTube-derived, metadata-only)
tags:
- audio
- automotive
- engine-sounds
- youtube
- weak-supervision
size_categories:
- 1M<n<10M
configs:
- config_name: default
data_files:
- split: train
path: data/train.parquet
- split: test
path: data/test.parquet
dataset_info:
features:
- name: window_id
dtype: string
- name: youtube_id
dtype: string
- name: engine_class
dtype: string
- name: start_sec
dtype: float64
- name: end_sec
dtype: float64
- name: contains_target
dtype: bool
- name: quality_flag
dtype: bool
- name: split
dtype: string
splits:
- name: train
num_examples: 1508084
- name: test
num_examples: 375639
download_size: 14615747
dataset_size: 14615747
---
# Engine Sound Windows (YouTube-derived, metadata-only)
Timestamps and weak labels for training an engine-configuration audio classifier (v-twin vs.
inline-4 vs. flat-6, etc.) from short audio windows. **This dataset does not contain audio.**
Each row points at a public YouTube video id plus a `(start_sec, end_sec)` window; you fetch
and slice the audio yourself (see [Reconstructing audio](#reconstructing-audio) below).
## Why metadata-only
The source audio was collected by searching YouTube (via [`yt-dlp`](https://github.com/yt-dlp/yt-dlp))
for engine-sound terms and downloading matching videos. The dataset author does not hold
redistribution rights to that audio, so — following the precedent set by
[AudioSet](https://research.google.com/audioset/), [MusicCaps](https://huggingface.co/datasets/google/MusicCaps),
and [FSD50K](https://zenodo.org/records/4060432) for exactly this situation — only the video id,
window timestamps, and derived labels are published here, not audio bytes. This also means the
`cc-by-sa-4.0` license above covers only this repository's metadata (ids, timestamps, labels); the
underlying YouTube videos remain under their original creators' copyright and are not
relicensed or redistributed by this dataset in any form.
## Dataset structure
| Column | Type | Meaning |
| --- | --- | --- |
| `window_id` | string | Unique id for this window (`winNNN`), stable across the whole corpus |
| `youtube_id` | string | 11-character YouTube video id (`https://www.youtube.com/watch?v=<youtube_id>`) |
| `engine_class` | string | Engine configuration label, e.g. `v8_flat`, `i4_diesel`, `single_two_stroke` |
| `start_sec` / `end_sec` | float | Window bounds within the source video, in seconds |
| `contains_target` | bool | See [Label semantics](#label-semantics) |
| `quality_flag` | bool | See [Label semantics](#label-semantics) |
| `split` | string | `train` or `test` — assigned per source video, so every window from one video stays in the same split |
Windows are 2.0 seconds long with 1.0 second of step between consecutive windows (50% overlap),
confirmed directly from the underlying manifest's timestamps.
## Label semantics
`contains_target` and `quality_flag` are **model-derived, not human-verified** — they come from
running [`panns_inference`](https://github.com/qiuqiangkong/audioset_tagging_cnn)'s
`AudioTagging` model (trained on AudioSet) over each window and thresholding two sets of its 527
class scores:
- `contains_target = True` when the window's max score across a set of engine/vehicle AudioSet
classes exceeds `0.585` — i.e. an engine sound was likely detected.
- `quality_flag = True` when the window's max score across a set of background-noise/contamination
AudioSet classes exceeds `0.2` — i.e. contamination was likely detected.
**`quality_flag = True` is a caution flag, not an endorsement** — despite the name, it does not
mean the window is good quality. Treat both columns as weak, noisy supervision (useful for
filtering or as auxiliary features) rather than ground truth.
`engine_class`, by contrast, comes from which search query the source video was found under —
also not independently verified per-video (see [Known limitations](#known-limitations)).
## Engine classes
43 engine classes, 3,830 source videos, after exclusions below:
| Engine class | Files | Windows | Train | Test |
| --- | --- | --- | --- | --- |
| `2_rotor` | 18 | 3740 | 3372 | 368 |
| `h12` | 10 | 4863 | 3981 | 882 |
| `h2` | 92 | 56012 | 37044 | 18968 |
| `h4` | 112 | 40657 | 34450 | 6207 |
| `h6` | 97 | 84341 | 57384 | 26957 |
| `i2_180` | 127 | 88771 | 66385 | 22386 |
| `i2_180_two_stroke` | 41 | 9162 | 7007 | 2155 |
| `i2_270` | 169 | 134456 | 104910 | 29546 |
| `i2_360` | 63 | 24789 | 18457 | 6332 |
| `i2_360_two_stroke` | 44 | 12124 | 10577 | 1547 |
| `i3` | 133 | 57496 | 45440 | 12056 |
| `i3_two_stroke` | 10 | 3219 | 2943 | 276 |
| `i4` | 392 | 166630 | 131564 | 35066 |
| `i4_crossplane` | 134 | 68221 | 48907 | 19314 |
| `i4_diesel` | 75 | 31429 | 26944 | 4485 |
| `i5` | 115 | 29789 | 24849 | 4940 |
| `i5_diesel` | 52 | 21759 | 17435 | 4324 |
| `i6` | 157 | 49570 | 35274 | 14296 |
| `i6_diesel` | 52 | 29830 | 26165 | 3665 |
| `single_four_stroke` | 101 | 42045 | 31663 | 10382 |
| `single_two_stroke` | 94 | 44185 | 33465 | 10720 |
| `v10_72` | 154 | 63020 | 46769 | 16251 |
| `v10_90` | 14 | 11291 | 8406 | 2885 |
| `v12` | 112 | 37882 | 35178 | 2704 |
| `v16` | 8 | 4512 | 4512 | 0 |
| `v2_45` | 138 | 165815 | 146284 | 19531 |
| `v2_90` | 97 | 83045 | 73491 | 9554 |
| `v2_two_stroke` | 11 | 2425 | 1915 | 510 |
| `v4` | 80 | 31392 | 26760 | 4632 |
| `v4_two_stroke` | 35 | 8369 | 6995 | 1374 |
| `v6_120` | 72 | 31924 | 21840 | 10084 |
| `v6_60` | 212 | 61043 | 47627 | 13416 |
| `v6_90_even` | 58 | 36963 | 33490 | 3473 |
| `v6_90_odd` | 5 | 3446 | 2629 | 817 |
| `v6_diesel` | 16 | 3346 | 2502 | 844 |
| `v8_60` | 18 | 6307 | 5173 | 1134 |
| `v8_cross` | 264 | 139946 | 120989 | 18957 |
| `v8_diesel` | 124 | 45184 | 35857 | 9327 |
| `v8_flat` | 180 | 81189 | 68971 | 12218 |
| `v8_voodoo` | 65 | 34937 | 27993 | 6944 |
| `vr6` | 54 | 11260 | 6762 | 4498 |
| `w12` | 19 | 8787 | 7173 | 1614 |
| `w16` | 6 | 8552 | 8552 | 0 |
Class sizes are heavily imbalanced (5 to 392 files per class) — account for this when
sampling/weighting during training.
## Known limitations
- **Weak, auto-derived labels.** `contains_target`/`quality_flag` come from an AudioSet-trained
tagger's thresholded scores, not human review (see [Label semantics](#label-semantics)).
- **Class imbalance.** File counts per class range from 5 (`v6_90_odd`) to 392 (`i4`).
- **Two classes have zero test windows.** `v16` and `w16` have only 8 and 6 source videos
respectively; the per-video random 80/20 split happened to put every video from both classes
into `train`. Don't evaluate on these classes without re-splitting.
- **97 ambiguous videos were excluded.** Cross-referencing every video id against every
engine_class it was scraped under found 97 YouTube videos that had been pulled into **more
than one conflicting engine_class** (almost certainly multi-engine compilation/comparison
videos caught by more than one search query, e.g. one video labeled both `v2_90` and `v4`,
another labeled across `i4_diesel`/`i6_diesel`/`v10_90`/`v8_diesel` simultaneously). All
windows sourced from any of these videos were dropped entirely (110,830 of 1,994,553 rows,
5.6%) rather than guessing which label was correct. This hit some already-small classes hard:
`v2_two_stroke` went from 19 to 11 files, `h12` from 18 to 10, `v10_90` from 19 to 14. The
class table above already reflects these counts.
- **Link rot.** Since only YouTube ids are published (see [Why metadata-only](#why-metadata-only)),
some fraction of source videos will become unavailable over time as creators delete or
privatize them — unlike a self-hosted audio dataset, this one can shrink on its own.
- **`engine_class` isn't independently verified per video** beyond the cross-class-conflict
check above — a video could still be mislabeled by its original search query in a way that
doesn't produce a detectable cross-class conflict (e.g. a single video mislabeled but never
scraped under any other class).
## Reconstructing audio
For a given row, download the source video's audio and trim to the window:
```bash
yt-dlp -f bestaudio -x --audio-format m4a \
"https://www.youtube.com/watch?v=<youtube_id>" -o source.m4a
ffmpeg -i source.m4a -ss <start_sec> -to <end_sec> -c copy window.m4a
```
For batch reconstruction, group rows by `youtube_id` first so each video is downloaded once
regardless of how many windows come from it.
## License and usage
The labels, timestamps, and ids in this repository are released under `cc-by-sa-4.0`. This does
**not** extend any rights to the underlying YouTube video content, which remains the property of
its original creators — this dataset does not redistribute, host, or relicense that audio.
Commercial users should independently verify their own right to use any audio they fetch via the
ids in this dataset. |