Skip to main content

MAEST inference-only package for music audio classification using efficient spectrogram transformers

Project description

maest-infer

PyPI Python 3.10+ License: AGPL-3.0

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.

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

  • MAEST - Original research repository with training code
  • PaSST - Patchout faSt Spectrogram Transformer (base architecture)
  • Essentia - MAEST models in Essentia

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maest_infer-0.1.0.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maest_infer-0.1.0-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

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

Hashes for maest_infer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93c049d717cc1eafccd5a4c885faa3d676b3bf9f3f1f0aed47358d5d65cc543e
MD5 a6ca76262a76c9825b2d429e027fa133
BLAKE2b-256 261d07bea76cdfbe21fefae47b5d2ccae8b20464adcbf5c39780020bb158ecff

See more details on using hashes here.

Provenance

The following attestation bundles were made for maest_infer-0.1.0.tar.gz:

Publisher: publish.yml on openmirlab/maest-infer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for maest_infer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1638ad5b6590ffecadbd9b71f7d4f0e0a9beb5d3862dde0ee447323a1e693e6e
MD5 a5fcd9da5e596712d2c5c7ddf7fb2d2e
BLAKE2b-256 308d6987756ca153e5bb3be295b0b877229b95b874322e1b4331d68869f8fdac

See more details on using hashes here.

Provenance

The following attestation bundles were made for maest_infer-0.1.0-py3-none-any.whl:

Publisher: publish.yml on openmirlab/maest-infer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page