File size: 2,721 Bytes
397861b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---

license: mit
library_name: pytorch
pipeline_tag: audio-classification
tags:
  - audio-classification
  - environmental-sound-classification
  - esc-50
  - urbansound8k
---


# Data-efficient audio classification: checkpoints

Models trained **from scratch** (no pretraining) on ESC-50 and UrbanSound8K under the official cross-validation
protocol: one model per test fold. The code, configs, logs and full results are on GitHub: [Atrementos/data-efficient-audio-classification](https://github.com/Atrementos/data-efficient-audio-classification).

## Contents

Each folder `<dataset>/<run>/` holds:

- `config.yaml`, the training config;
- `classes.json`, the class names in label order;
- `fold<k>/model_raw.safetensors`, the weights after the last epoch, which give the reported numbers;
- `fold<k>/done.json`, that fold's test metrics.

| Folder | Model | Accuracy (mean over the folds) |
|---|---|---|
| `esc50/ours_bf16_seed{42,43,44}` | audio-adapted ResNet-18, 11.2 M params | 92.80 / 92.95 / 92.80 |
| `esc50/resnet34` | ResNet-34 | 92.05 |
| `esc50/vmamba_t` | VMamba-T [s1l8] | 90.20 |
| `esc50/deit_s` | ViT-S | 83.50 |
| `esc50/ablation_*` | our model without one component | see the GitHub results |
| `us8k/ours_bf16` | audio-adapted ResNet-18, **folds 1–4 only** | 85.45 / 85.81 / 78.27 / 91.11 |
| `us8k/vmamba_t` | VMamba-T | 82.57 |
| `us8k/deit_s` | ViT-S | 78.39 |

The `deit_s` folders hold ViT-S/16 models trained from scratch: the architecture of timm's `deit_small_patch16_224`, with
no DeiT checkpoint or DeiT training recipe.

All runs used bf16 mixed precision; the weights are stored in fp32. Weights were not kept for UrbanSound8K folds 5–10
of our model or for ResNet-34 on UrbanSound8K; their logs and predictions are on GitHub.

Each fold model was trained on every other fold. To measure accuracy, evaluate it only on its own test fold.

## Usage

```bash

git clone https://github.com/Atrementos/data-efficient-audio-classification

cd data-efficient-audio-classification

pip install -r requirements.txt && pip install -e . --no-deps

hf download Zenma/data-efficient-audio-classification --include "esc50/ours_bf16_seed42/*" --local-dir checkpoints

python evaluate.py checkpoints/esc50/ours_bf16_seed42 --data-root data/ESC-50-master

python predict.py checkpoints/esc50/ours_bf16_seed42 clip.wav --fold 1

```

The models take raw audio at the config's sample rate (44.1 kHz for our model, 16 kHz for the baselines), padded or
cut to 5 s (ESC-50) or 4 s (UrbanSound8K). Clips are level-normalised as in `deaudio.training.clip_scales`.

## License

MIT for the weights. The training data (ESC-50, UrbanSound8K) is CC BY-NC.