MAEST inference-only package for music audio classification using efficient spectrogram transformers
Project description
maest-infer
Inference-only package for MAEST (Music Audio Efficient Spectrogram Transformer).
This is a lightweight, dependency-minimal repackaging of MAEST focused solely on inference. For training, fine-tuning, and the full research codebase, please visit the original MAEST repository.
Installation
# From PyPI
pip install maest-infer
# Or with uv
uv pip install maest-infer
For development:
git clone https://github.com/palonso/maest.git
cd maest
pip install -e .
Usage
import torch
from maest_infer import get_maest
# Load model (downloads pretrained weights automatically from Hugging Face)
model = get_maest(arch="discogs-maest-30s-pw-129e-519l")
model.eval()
# Inference with raw 16kHz audio
audio = torch.randn(16000 * 30) # 30 seconds
logits, embeddings = model(audio)
# logits: (1, 519), embeddings: (1, 768)
# Predict with labels
activations, labels = model.predict_labels(audio)
Available Models
| Model | Input Length | Labels | Description |
|---|---|---|---|
discogs-maest-5s-pw-129e |
5 sec | 400 | PaSST weights |
discogs-maest-10s-fs-129e |
10 sec | 400 | From scratch |
discogs-maest-10s-pw-129e |
10 sec | 400 | PaSST weights |
discogs-maest-10s-dw-75e |
10 sec | 400 | DeiT weights |
discogs-maest-20s-pw-129e |
20 sec | 400 | PaSST weights |
discogs-maest-30s-pw-129e |
30 sec | 400 | PaSST weights |
discogs-maest-30s-pw-73e-ts |
30 sec | 400 | Teacher-student |
discogs-maest-30s-pw-129e-519l |
30 sec | 519 | Extended labels |
All models are hosted on Hugging Face and downloaded automatically on first use.
License
This package is licensed under AGPL-3.0-only, following the original MAEST license.
Credits & Acknowledgments
This package is a repackaging of MAEST (Music Audio Efficient Spectrogram Transformer) created by Pablo Alonso-Jimenez and colleagues at the Music Technology Group (MTG), Universitat Pompeu Fabra.
- Original Repository: https://github.com/palonso/maest
- Hugging Face Models: https://huggingface.co/mtg-upf
- Paper: arXiv:2309.16418
We are grateful to the original authors for making their research and pretrained models publicly available.
Citation
If you use MAEST in your research, please cite the original paper:
@inproceedings{alonso2023efficient,
title={Efficient Supervised Training of Audio Transformers for Music Representation Learning},
author={Alonso-Jim{\'e}nez, Pablo and Serra, Xavier and Bogdanov, Dmitry},
booktitle={Proceedings of the 24th International Society for Music Information Retrieval Conference (ISMIR)},
year={2023},
}
Related Projects
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maest_infer-0.1.0.tar.gz.
File metadata
- Download URL: maest_infer-0.1.0.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93c049d717cc1eafccd5a4c885faa3d676b3bf9f3f1f0aed47358d5d65cc543e
|
|
| MD5 |
a6ca76262a76c9825b2d429e027fa133
|
|
| BLAKE2b-256 |
261d07bea76cdfbe21fefae47b5d2ccae8b20464adcbf5c39780020bb158ecff
|
Provenance
The following attestation bundles were made for maest_infer-0.1.0.tar.gz:
Publisher:
publish.yml on openmirlab/maest-infer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maest_infer-0.1.0.tar.gz -
Subject digest:
93c049d717cc1eafccd5a4c885faa3d676b3bf9f3f1f0aed47358d5d65cc543e - Sigstore transparency entry: 719582354
- Sigstore integration time:
-
Permalink:
openmirlab/maest-infer@a6728f71cf979472ec0451285d10e6915bf1eeee -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/openmirlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6728f71cf979472ec0451285d10e6915bf1eeee -
Trigger Event:
release
-
Statement type:
File details
Details for the file maest_infer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: maest_infer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1638ad5b6590ffecadbd9b71f7d4f0e0a9beb5d3862dde0ee447323a1e693e6e
|
|
| MD5 |
a5fcd9da5e596712d2c5c7ddf7fb2d2e
|
|
| BLAKE2b-256 |
308d6987756ca153e5bb3be295b0b877229b95b874322e1b4331d68869f8fdac
|
Provenance
The following attestation bundles were made for maest_infer-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on openmirlab/maest-infer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maest_infer-0.1.0-py3-none-any.whl -
Subject digest:
1638ad5b6590ffecadbd9b71f7d4f0e0a9beb5d3862dde0ee447323a1e693e6e - Sigstore transparency entry: 719582356
- Sigstore integration time:
-
Permalink:
openmirlab/maest-infer@a6728f71cf979472ec0451285d10e6915bf1eeee -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/openmirlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6728f71cf979472ec0451285d10e6915bf1eeee -
Trigger Event:
release
-
Statement type: