Views
No views yet
| Metric | Value |
|---|---|
| Accuracy | 98.50 |
1import sys, torch
2from huggingface_hub import snapshot_download
3
4local_dir = snapshot_download("hanxunh/AudioMosaic-vit-b16-finetune-esc-split4")
5sys.path.insert(0, local_dir)
6
7from load_model import load_classifier
8model = load_classifier(device="cuda")
9
10# Forward a log-mel spectrogram batch of shape [B, 1, 1024, 128]
11fbank = torch.randn(2, 1, 1024, 128).cuda()
12with torch.no_grad():
13 logits = model(fbank) # [B, 50]
14 pred = logits.argmax(dim=-1) # predicted class idmodel.safetensors — fine-tuned classifier weightsconfig.json — architecture hyperparametersmodeling.py — vendored model architecture (no need to install AudioMosaic)load_model.py — convenience loadertorch, timm, torchlibrosa, safetensors, huggingface_hub.1@inproceedings{huang2026audiomosaic,
2 title={AudioMosaic: Contrastive Masked Audio Representation Learning},
3 author={Hanxun Huang and Qizhou Wang and Xingjun Ma and Cihang Xie and Christopher Leckie and Sarah Erfani},
4 booktitle={ICML},
5 year={2026}
6}