| --- |
| 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. |