Improve dataset card: Add task category, correct links, abstract, sample usage, and citation
#2
by
nielsr
HF Staff
- opened
README.md
CHANGED
|
@@ -3,12 +3,107 @@ license: mit
|
|
| 3 |
tags:
|
| 4 |
- music
|
| 5 |
- chord
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
# BACHI: Boundary-Aware Symbolic Chord Recognition Through Masked Iterative Decoding on Pop and Classical Music
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
* Mingyang Yao and Ke Chen
|
| 11 |
"[BACHI: Boundary-Aware Symbolic Chord Recognition Through Masked Iterative Decoding on Pop and Classical Music](https://arxiv.org/abs/2510.06528)."
|
| 12 |
preprint, 2025
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
- music
|
| 5 |
- chord
|
| 6 |
+
task_categories:
|
| 7 |
+
- other
|
| 8 |
---
|
| 9 |
|
| 10 |
# BACHI: Boundary-Aware Symbolic Chord Recognition Through Masked Iterative Decoding on Pop and Classical Music
|
| 11 |
+
|
| 12 |
+
[Paper](https://huggingface.co/papers/2510.06528) | [Project Page](https://andyweasley2004.github.io/BACHI/) | [Code](https://github.com/AndyWeasley2004/BACHI_Chord_Recognition) | [POP909-CL Dataset](https://github.com/AndyWeasley2004/POP909-CL-Dataset)
|
| 13 |
+
|
| 14 |
+
This repository contains trained model weights and classical datasets for the paper:
|
| 15 |
* Mingyang Yao and Ke Chen
|
| 16 |
"[BACHI: Boundary-Aware Symbolic Chord Recognition Through Masked Iterative Decoding on Pop and Classical Music](https://arxiv.org/abs/2510.06528)."
|
| 17 |
preprint, 2025
|
| 18 |
|
| 19 |
+
## Abstract
|
| 20 |
+
|
| 21 |
+
Automatic chord recognition (ACR) via deep learning models has gradually achieved promising recognition accuracy, yet two key challenges remain. First, prior work has primarily focused on audio-domain ACR, while symbolic music (e.g., score) ACR has received limited attention due to data scarcity. Second, existing methods still overlook strategies that are aligned with human music analytical practices. To address these challenges, we make two contributions: (1) we introduce POP909-CL, an enhanced version of POP909 dataset with tempo-aligned content and human-corrected labels of chords, beats, keys, and time signatures; and (2) We propose BACHI, a symbolic chord recognition model that decomposes the task into different decision steps, namely boundary detection and iterative ranking of chord root, quality, and bass (inversion). This mechanism mirrors the human ear-training practices. Experiments demonstrate that BACHI achieves state-of-the-art chord recognition performance on both classical and pop music benchmarks, with ablation studies validating the effectiveness of each module.
|
| 22 |
+
|
| 23 |
+
## Description
|
| 24 |
+
|
| 25 |
+
This Hugging Face repository provides the trained model weights and classical datasets used in the BACHI paper. Specifically, it includes:
|
| 26 |
+
- **Trained Model Checkpoints**:
|
| 27 |
+
- Classical Model: Trained on When-in-Rome + DCML corpus; available at `classical_film_kdec` within this repository.
|
| 28 |
+
- Pop Model: Trained on POP909-CL; available at `pop909_film_kdec` within this repository.
|
| 29 |
+
- **Classical Datasets**: Processed data for When-in-Rome & DCML, as described in the paper, for training BACHI. These are the `unique_data_collection` files in this repository.
|
| 30 |
+
|
| 31 |
+
## Sample Usage (Inference)
|
| 32 |
+
|
| 33 |
+
To use the provided trained models for chord recognition, follow these steps.
|
| 34 |
+
|
| 35 |
+
### Environment
|
| 36 |
+
|
| 37 |
+
### Requirements
|
| 38 |
+
- Python 3.8+
|
| 39 |
+
- PyTorch 2.0+
|
| 40 |
+
- CUDA (optional, for GPU acceleration)
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
pip install -r requirements.txt
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
### Quick Start
|
| 47 |
+
|
| 48 |
+
Use the provided inference script to predict chords for new music scores with pre-trained checkpoints below:
|
| 49 |
+
|
| 50 |
+
- **Classical Model**: Trained on When-in-Rome + DCML corpus; [checkpoint](https://huggingface.co/datasets/Itsuki-music/BACHI_Chord_Recognition/tree/main/classical_film_kdec)
|
| 51 |
+
- **Pop Model**: Trained on POP909-CL; [checkpoint](https://huggingface.co/datasets/Itsuki-music/BACHI_Chord_Recognition/tree/main/pop909_film_kdec)
|
| 52 |
+
|
| 53 |
+
#### Single File Inference
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
python inference.py \
|
| 57 |
+
--input /path/to/score \
|
| 58 |
+
--output predictions/ \
|
| 59 |
+
--checkpoint_dir /path/to/checkpoint_directory
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
#### Group Inference by Folder
|
| 63 |
+
|
| 64 |
+
```bash
|
| 65 |
+
python inference.py \
|
| 66 |
+
--input /path/to/scores_directory/ \
|
| 67 |
+
--output predictions/ \
|
| 68 |
+
--checkpoint_dir /path/to/checkpoint_directory
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
The `--checkpoint_dir` should point to a directory containing:
|
| 72 |
+
- `best_model.pt` (model checkpoint)
|
| 73 |
+
- `config.yaml` (model configuration)
|
| 74 |
+
- Vocabulary file (path specified in config)
|
| 75 |
+
|
| 76 |
+
**Supported formats**: `.musicxml`, `.mxl`, `.xml`, `.mid`, `.midi`
|
| 77 |
+
|
| 78 |
+
#### Output Format
|
| 79 |
+
|
| 80 |
+
Predictions are saved as text files with the format.
|
| 81 |
+
```
|
| 82 |
+
0.00 C_M_C
|
| 83 |
+
2.50 F_M_F
|
| 84 |
+
4.00 G_M_G
|
| 85 |
+
6.50 C_M_C
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
Each line represents a chord change with:
|
| 89 |
+
- Beat position (in quarter notes)
|
| 90 |
+
- Root note
|
| 91 |
+
- Quality (M=major, m=minor, D7=dominant 7th, etc.)
|
| 92 |
+
- Bass note (for inversions)
|
| 93 |
+
|
| 94 |
+
## Citation
|
| 95 |
+
|
| 96 |
+
If you use BACHI or POP909-CL in your research, please cite:
|
| 97 |
+
|
| 98 |
+
```bibtex
|
| 99 |
+
@inproceedings{yao2026bachi,
|
| 100 |
+
title={BACHI: Boundary-Aware Symbolic Chord Recognition Through Masked Iterative Decoding on Pop and Classical Music},
|
| 101 |
+
author={Mingyang Yao and Ke Chen and Shlomo Dubnov and Taylor Berg-Kirkpatrick},
|
| 102 |
+
booktitle={arxiv},
|
| 103 |
+
year={2025}
|
| 104 |
+
}
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
## License
|
| 108 |
+
|
| 109 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|