Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- zh
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- music-source-separation
|
| 7 |
+
- chinese-folk-music
|
| 8 |
+
- audio
|
| 9 |
+
- pytorch
|
| 10 |
+
datasets:
|
| 11 |
+
- ccmusic-database/CTIS
|
| 12 |
+
- ccmusic-database/erhu_playing_tech
|
| 13 |
+
- ccmusic-database/Guzheng_Tech99
|
| 14 |
+
- M4Singer/M4Singer
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Loom of Time — Model Weights
|
| 18 |
+
|
| 19 |
+
Model checkpoints for **Loom of Time (岁月织机)**, an interactive art installation
|
| 20 |
+
presented at ACM Multimedia 2026 (Interactive Art Track).
|
| 21 |
+
|
| 22 |
+
**GitHub repository:** [HAoyu-baller/Loom-of-Time-Music-Viz](https://github.com/HAoyu-baller/Loom-of-Time-Music-Viz)
|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## Contents
|
| 27 |
+
|
| 28 |
+
```
|
| 29 |
+
models/
|
| 30 |
+
separator/
|
| 31 |
+
best.pt # BSRoformer 5-stem separator (best val loss)
|
| 32 |
+
last.pt # BSRoformer 5-stem separator (final epoch)
|
| 33 |
+
classifier/
|
| 34 |
+
loom_best.pth # ResNet18 regional classifier (5 Chinese folk regions)
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## Models
|
| 40 |
+
|
| 41 |
+
### BSRoformer Separator (`models/separator/best.pt`)
|
| 42 |
+
|
| 43 |
+
Separates a Chinese folk music recording into 5 stems:
|
| 44 |
+
**vocal · erhu · plucked strings · wind · percussion**
|
| 45 |
+
|
| 46 |
+
| Config | Value |
|
| 47 |
+
|---|---|
|
| 48 |
+
| Architecture | Band-Split Rotary Transformer (BSRoformer) |
|
| 49 |
+
| dim | 256 |
|
| 50 |
+
| depth | 6 |
|
| 51 |
+
| heads | 8 |
|
| 52 |
+
| Parameters | ~15–20 M |
|
| 53 |
+
| Sample rate | 22,050 Hz |
|
| 54 |
+
| Chunk size | 132,300 samples (6 s) with 22,050-sample overlap |
|
| 55 |
+
|
| 56 |
+
### ResNet18 Classifier (`models/classifier/loom_best.pth`)
|
| 57 |
+
|
| 58 |
+
Classifies the regional origin of a Chinese folk song into one of 5 categories:
|
| 59 |
+
**Jiangnan · Shaanxi · Yungui · Huanan · Dongbei**
|
| 60 |
+
|
| 61 |
+
| Config | Value |
|
| 62 |
+
|---|---|
|
| 63 |
+
| Backbone | ResNet18 (ImageNet pretrained) |
|
| 64 |
+
| Head | Dropout(0.4) → Linear(512,256) → ReLU → Dropout(0.3) → Linear(256,5) |
|
| 65 |
+
| Input | Mel-spectrogram image (128 mel bins, magma colormap, 224×224 px) |
|
| 66 |
+
| Inference | Chunk-based hard voting across 6-second clips |
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
## Usage
|
| 71 |
+
|
| 72 |
+
See the [GitHub repository](https://github.com/HAoyu-baller/Loom-of-Time-Music-Viz)
|
| 73 |
+
for full installation instructions and inference code.
|
| 74 |
+
|
| 75 |
+
```python
|
| 76 |
+
from huggingface_hub import hf_hub_download
|
| 77 |
+
|
| 78 |
+
hf_hub_download('Haoyu123123/loom-of-time-models', 'models/separator/best.pt',
|
| 79 |
+
local_dir='backend/training/checkpoints')
|
| 80 |
+
hf_hub_download('Haoyu123123/loom-of-time-models', 'models/classifier/loom_best.pth',
|
| 81 |
+
local_dir='backend/classifier/models')
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
## Citation
|
| 87 |
+
|
| 88 |
+
```bibtex
|
| 89 |
+
@inproceedings{ruan2026loom,
|
| 90 |
+
title = {Loom of Time: Real-Time Chinese Folk Music Decomposition
|
| 91 |
+
and Generative Weaving Visualization},
|
| 92 |
+
author = {Ruan, Haoyu},
|
| 93 |
+
booktitle = {Proceedings of the 34th ACM International Conference on
|
| 94 |
+
Multimedia (Interactive Art Track)},
|
| 95 |
+
year = {2026},
|
| 96 |
+
publisher = {ACM}
|
| 97 |
+
}
|
| 98 |
+
```
|