Datasets:
Uploading data and preview
Browse files- OpenPIR_PerformanceStat_Han.png +3 -0
- OpenPIR_PerformanceStat_SOTA.png +3 -0
- README.md +237 -3
- openpir_metadata.jsonl +0 -0
OpenPIR_PerformanceStat_Han.png
ADDED
|
Git LFS Details
|
OpenPIR_PerformanceStat_SOTA.png
ADDED
|
Git LFS Details
|
README.md
CHANGED
|
@@ -1,3 +1,237 @@
|
|
| 1 |
-
---
|
| 2 |
-
license:
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- audio-classification
|
| 5 |
+
tags:
|
| 6 |
+
- audio
|
| 7 |
+
- music
|
| 8 |
+
- instrument-recognition
|
| 9 |
+
- predominant-instrument
|
| 10 |
+
- openmic
|
| 11 |
+
- irmas
|
| 12 |
+
- multi-label
|
| 13 |
+
pretty_name: OpenPIR
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1K<n<10K
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# OpenPIR: Open Predominant Instrument Recognition Dataset
|
| 19 |
+
|
| 20 |
+
OpenPIR is a hand-labeled dataset for **predominant instrument recognition (PIR)** built from [OpenMic-2018](https://zenodo.org/record/1432913), a Creative Commons-licensed collection of 10-second music clips sourced from the [Free Music Archive](https://freemusicarchive.org/). It was introduced as part of the ICASSP 2026 paper:
|
| 21 |
+
|
| 22 |
+
> **Leveraging Diffusion U-Net Features for Predominant Instrument Recognition**
|
| 23 |
+
> Charis Cochran, Yeongheon Lee, Youngmoo Kim — Drexel University / University of Pennsylvania
|
| 24 |
+
> [IEEE Xplore](https://ieeexplore.ieee.org/document/11464738) · [Code & Demo](https://github.com/charisrenee/InstrumentRecognitionWithDiffusion)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## Dataset Summary
|
| 29 |
+
|
| 30 |
+
[IRMAS](https://www.upf.edu/web/mtg/irmas) is the standard training dataset for predominant instrument recognition, but it has two well-known limitations: relatively small size (6,705 clips), and studio-recorded solo performances that do not reflect the overlapping timbres of real-world music. OpenPIR addresses both by adding 1,228 annotated clips from OpenMic-2018 that are compatible with IRMAS labels — supplementing every instrument category and introducing genuine multi-label annotations.
|
| 31 |
+
|
| 32 |
+
## Dataset Construction
|
| 33 |
+
|
| 34 |
+
OpenMic-2018 provides crowd-sourced instrument *presence/absence* scores (0–1) across 20 classes for ~20,000 clips from the Free Music Archive, but does not identify which instrument is **predominant**. To produce PIR-compatible labels, the following pipeline was applied:
|
| 35 |
+
|
| 36 |
+
1. **Filter to IRMAS classes.** OpenMic-2018 annotations were filtered to retain only the 11 instrument classes shared with IRMAS.
|
| 37 |
+
2. **Candidate selection.** From the filtered set, clips where exactly one instrument received a relevance score above **0.80** and all others fell below **0.40** were kept. This yielded ~4,500 candidates.
|
| 38 |
+
3. **Manual labeling.** Each candidate was listened to and annotated for:
|
| 39 |
+
- Predominant instrument(s) — guitar was differentiated into *acoustic* vs. *electric* to match IRMAS classes
|
| 40 |
+
- IRMAS-equivalent genre (mapped from FMA tags)
|
| 41 |
+
- Drum/percussion presence (to match the IRMAS annotation convention)
|
| 42 |
+
4. **Consistency check.** Only clips where the labeled instrument was predominant for the entire 10-second clip were retained. For clips where the instrument was predominant for only part of the clip, a start/stop time was selected manually, keeping the segment above 3 seconds.
|
| 43 |
+
5. **Genre exclusion.** Clips from genres diverging strongly from IRMAS content (e.g., Drone, Glitch) were removed.
|
| 44 |
+
|
| 45 |
+
This process yielded **1,228 clips** across 11 instrument classes.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## Dataset Statistics
|
| 50 |
+
|
| 51 |
+
| | Count |
|
| 52 |
+
|---|---|
|
| 53 |
+
| **Total clips** | 1,228 |
|
| 54 |
+
| **Single-instrument clips** | 905 |
|
| 55 |
+
| **Multi-instrument clips** | 323 |
|
| 56 |
+
| **Instrument classes** | 11 (+ "other instrument") |
|
| 57 |
+
| **Genre classes** | 6 IRMAS genres + instrumental + soundtrack |
|
| 58 |
+
|
| 59 |
+
### Instrument Distribution
|
| 60 |
+
|
| 61 |
+
Labels are multi-hot (a clip can have more than one predominant instrument).
|
| 62 |
+
|
| 63 |
+
| Instrument | IRMAS code | Label occurrences |
|
| 64 |
+
|---|---|---|
|
| 65 |
+
| Electric guitar | `gel` | 222 |
|
| 66 |
+
| Piano | `pia` | 195 |
|
| 67 |
+
| Voice / singing | `voi` | 188 |
|
| 68 |
+
| Cello | `cel` | 172 |
|
| 69 |
+
| Acoustic guitar | `gac` | 166 |
|
| 70 |
+
| Violin | `vio` | 142 |
|
| 71 |
+
| Organ | `org` | 130 |
|
| 72 |
+
| Saxophone | `sax` | 107 |
|
| 73 |
+
| Trumpet | `tru` | 72 |
|
| 74 |
+
| Other instrument | — | 69 |
|
| 75 |
+
| Flute | `flu` | 68 |
|
| 76 |
+
| Clarinet | `cla` | 40 |
|
| 77 |
+
|
| 78 |
+
*"Other instrument" is used for clips whose predominant instrument falls outside the 11 IRMAS classes (e.g., synthesizer, banjo, mandolin). These clips are included in the dataset but excluded from IRMAS-code evaluation.*
|
| 79 |
+
|
| 80 |
+
### Genre Distribution
|
| 81 |
+
|
| 82 |
+
Genre labels are mapped to the IRMAS genre taxonomy.
|
| 83 |
+
|
| 84 |
+
| Genre | IRMAS code | Clips |
|
| 85 |
+
|---|---|---|
|
| 86 |
+
| Instrumental / no clear genre | `instrumental` | 361 |
|
| 87 |
+
| Pop / rock | `pop_roc` | 328 |
|
| 88 |
+
| Country / folk | `cou_fol` | 300 |
|
| 89 |
+
| Classical | `cla` | 280 |
|
| 90 |
+
| Jazz / blues | `jaz_blu` | 168 |
|
| 91 |
+
| Soundtrack / score | `soundtrack` | 127 |
|
| 92 |
+
| Latin / soul | `lat_sou` | 65 |
|
| 93 |
+
| Not available | `NA` | 83 |
|
| 94 |
+
|
| 95 |
+
*Genre counts exceed 1,228 because a small number of clips carry two genre labels. The `NA` category covers clips whose FMA genre tags could not be reliably mapped.*
|
| 96 |
+
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
## Experimental Results
|
| 100 |
+
|
| 101 |
+
OpenPIR was used to fine-tune a baseline PIR model (trained on IRMAS + MUMS solo recordings) and measure the effect on held-out evaluation performance. Four model variants were compared:
|
| 102 |
+
|
| 103 |
+
| Model | Training procedure |
|
| 104 |
+
|---|---|
|
| 105 |
+
| **Baseline** | Trained on IRMAS + MUMS solos, 400 epochs |
|
| 106 |
+
| **Model A** | Baseline fine-tuned 100 epochs on IRMAS only |
|
| 107 |
+
| **Model B** | Baseline fine-tuned 100 epochs on IRMAS + OpenPIR |
|
| 108 |
+
| **Model C** | Sequential fine-tune: B → 100 more epochs on IRMAS + OpenPIR |
|
| 109 |
+
|
| 110 |
+
### Comparison with prior work
|
| 111 |
+
|
| 112 |
+
Adding OpenPIR (≈3.2 hours of additional data) achieves competitive Micro and Macro F1 against systems that use substantially more augmentation data.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
|
| 116 |
+
### Per-class performance vs. Han et al. baseline
|
| 117 |
+
|
| 118 |
+
The chart below compares per-class Precision, Recall, and F1 for our best model against a reimplementation of Han et al.
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
|
| 122 |
+
---
|
| 123 |
+
|
| 124 |
+
## Data Fields
|
| 125 |
+
|
| 126 |
+
The dataset is distributed as `openpir_metadata.jsonl`. Each line is a JSON object with the following fields:
|
| 127 |
+
|
| 128 |
+
| Field | Type | Description |
|
| 129 |
+
|---|---|---|
|
| 130 |
+
| `sample_key` | `string` | OpenMic-2018 sample identifier (`{track_id}_{start_frame}`) |
|
| 131 |
+
| `filepath` | `string` | Relative path to the audio file within the OpenMic-2018 archive |
|
| 132 |
+
| `artist` | `string` | Artist name from FMA metadata |
|
| 133 |
+
| `title` | `string` | Track title from FMA metadata |
|
| 134 |
+
| `album` | `string` | Album name from FMA metadata |
|
| 135 |
+
| `instrument` | `list[string]` | Predominant instrument(s), full English names (e.g. `"acoustic guitar"`) |
|
| 136 |
+
| `openmic_genres` | `list[string]` | Original FMA genre tags carried through from OpenMic-2018 |
|
| 137 |
+
| `genre` | `list[string]` | Genre(s) mapped to IRMAS taxonomy codes |
|
| 138 |
+
| `tags` | `list[string]` | Additional free-form tags (may be empty) |
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
## How to Use
|
| 143 |
+
|
| 144 |
+
### Load the metadata
|
| 145 |
+
|
| 146 |
+
```python
|
| 147 |
+
from datasets import load_dataset
|
| 148 |
+
|
| 149 |
+
ds = load_dataset("charisreneec/OpenPIR", split="train")
|
| 150 |
+
print(ds[0])
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
### Map labels to IRMAS codes
|
| 154 |
+
|
| 155 |
+
```python
|
| 156 |
+
INSTRUMENT_TO_IRMAS = {
|
| 157 |
+
"cello": "cel",
|
| 158 |
+
"clarinet": "cla",
|
| 159 |
+
"flute": "flu",
|
| 160 |
+
"acoustic guitar": "gac",
|
| 161 |
+
"electric guitar": "gel",
|
| 162 |
+
"organ": "org",
|
| 163 |
+
"piano": "pia",
|
| 164 |
+
"saxophone": "sax",
|
| 165 |
+
"trumpet": "tru",
|
| 166 |
+
"violin": "vio",
|
| 167 |
+
"voice": "voi",
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
def get_irmas_labels(example):
|
| 171 |
+
return [INSTRUMENT_TO_IRMAS[i] for i in example["instrument"] if i in INSTRUMENT_TO_IRMAS]
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
### Load audio (requires OpenMic-2018)
|
| 175 |
+
|
| 176 |
+
The audio files are not redistributed here because they originate from OpenMic-2018 (CC BY 4.0, Free Music Archive). Download the archive from Zenodo and point your loader at it:
|
| 177 |
+
|
| 178 |
+
```python
|
| 179 |
+
import json, soundfile as sf
|
| 180 |
+
from pathlib import Path
|
| 181 |
+
|
| 182 |
+
openmic_root = Path("/path/to/openmic-2018") # set to your local copy
|
| 183 |
+
|
| 184 |
+
with open("openpir_metadata.jsonl") as f:
|
| 185 |
+
records = [json.loads(line) for line in f]
|
| 186 |
+
|
| 187 |
+
for record in records:
|
| 188 |
+
audio_path = openmic_root / record["filepath"]
|
| 189 |
+
audio, sr = sf.read(audio_path)
|
| 190 |
+
labels = record["instrument"]
|
| 191 |
+
# ... your processing here
|
| 192 |
+
```
|
| 193 |
+
|
| 194 |
+
---
|
| 195 |
+
|
| 196 |
+
## Source Data & License
|
| 197 |
+
|
| 198 |
+
OpenPIR labels are released under **CC BY 4.0**.
|
| 199 |
+
|
| 200 |
+
The underlying audio clips come from **OpenMic-2018**, which is itself derived from the **Free Music Archive** and also released under CC BY 4.0. If you use OpenPIR, you must also comply with the OpenMic-2018 license terms:
|
| 201 |
+
|
| 202 |
+
- OpenMic-2018: Humphrey et al., "OpenMIC-2018: An Open Data-set for Multiple Instrument Recognition," *ISMIR 2018*. [Zenodo record](https://zenodo.org/record/1432913)
|
| 203 |
+
- Free Music Archive: [freemusicarchive.org](https://freemusicarchive.org/)
|
| 204 |
+
|
| 205 |
+
---
|
| 206 |
+
|
| 207 |
+
## Citation
|
| 208 |
+
|
| 209 |
+
If you use OpenPIR in your work, please cite:
|
| 210 |
+
|
| 211 |
+
```bibtex
|
| 212 |
+
@inproceedings{cochran2026openpir,
|
| 213 |
+
title = {Leveraging Diffusion U-Net Features for Predominant Instrument Recognition},
|
| 214 |
+
author = {Cochran, Charis and Lee, Yeongheon and Kim, Youngmoo},
|
| 215 |
+
booktitle = {Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
|
| 216 |
+
year = {2026},
|
| 217 |
+
url = {https://ieeexplore.ieee.org/document/11464738}
|
| 218 |
+
}
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
and OpenMic-2018:
|
| 222 |
+
|
| 223 |
+
```bibtex
|
| 224 |
+
@inproceedings{humphrey2018openmic,
|
| 225 |
+
title = {{OpenMIC-2018}: An Open Data-set for Multiple Instrument Recognition},
|
| 226 |
+
author = {Humphrey, Eric J. and Durand, Simon and McFee, Brian},
|
| 227 |
+
booktitle = {Proceedings of the International Society for Music Information Retrieval Conference (ISMIR)},
|
| 228 |
+
year = {2018}
|
| 229 |
+
}
|
| 230 |
+
```
|
| 231 |
+
|
| 232 |
+
---
|
| 233 |
+
|
| 234 |
+
## Contact
|
| 235 |
+
|
| 236 |
+
Charis Cochran — [charisreneec@gmail.com](mailto:charisreneec@gmail.com)
|
| 237 |
+
Drexel University / University of Pennsylvania
|
openpir_metadata.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|