/ Модель

Характеристики

Лицензия
CC BY-NC-SA 4.0
Библиотека
torch
Опубликована
10 фев 2026

music-aesthetics

Классификация аудиоАудио → label3 профессии

Модель LAION оценивает музыкальные аудиозаписи по пяти аспектам эстетического качества и рассчитывает общую оценку.

0скачиваний за 30 дней10лайковвеса обновлены3 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Music Aesthetics Scorer — модель LAION для оценки эстетического качества музыкальных аудиозаписей. Она предсказывает пять оценок по шкале от 1 до 5: естественность исполнения, чистоту звучания и сведения, музыкальность, связность структуры и запоминаемость. Итоговая оценка вычисляется как среднее этих пяти показателей.

Модель использует эмбеддинги энкодера Whisper: 30 секунд аудио кодируются в последовательность из 1500 векторов размерности 768, затем признаки агрегируются по десяти сегментам с помощью среднего, максимального и минимального значений. Mixture of Experts с общим bottleneck-слоем и пятью отдельными MLP-головами обучена на SongEval: 2399 композиций с оценками 16 экспертов. Энкодер Whisper заморожен, обучались только bottleneck и головы предсказания.

Модель предназначена для автоматизированной оценки качества музыки, в частности для анализа и отбора треков, созданных ИИ. Она принимает аудио и выдаёт числовые оценки. Репозиторий содержит веса PyTorch; лицензия CC BY-NC-SA 4.0 разрешает использование на указанных в ней условиях, включая некоммерческий характер и распространение производных работ на тех же условиях.

Сценарии применения

  • оценка естественности исполнения музыкального трека
  • оценка чистоты звучания и сведения
  • оценка музыкальности композиции
  • оценка связности структуры музыкального произведения
  • оценка запоминаемости мелодии или ритма
  • сравнение и отбор музыки, созданной ИИ

Ограничения

Модель оценивает записи длиной 30 секунд и обучена на ограниченном наборе SongEval из 2399 композиций с экспертными оценками; качество оценок на других жанрах и типах аудио может отличаться. Лицензия CC BY-NC-SA 4.0 ограничивает коммерческое использование.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Music Aesthetics Scorer

This model predicts aesthetic quality scores for music audio files. It is a "Mixture of Experts" model that takes embeddings extracted from the https://huggingface.co/laion/music-whisper model and predicts 5 metrics defined by the SongEval dataset.

Companion release of the NeurIPS 2026 Evaluations & Datasets Track paper LAION-Tunes: An Open 1.4M-Track Dataset and Perceptual Benchmark for AI-Generated Music (Kaczmarczyk, Ahmed, Friedrich, Erickson, Sharoni, Herremans, Schuhmann). Code: LAION-AI/tunes. Demo: Tunes-Search.

The Metrics

The model rates audio on a scale of 1.0 to 5.0 for the following qualities:

  1. Naturalness: Does the audio sound like a realistic, human performance? Low scores indicate synthetic artifacts, robotic voices, or obvious generation glitches.
  2. Clarity: The quality of the production and mixing. Is the audio distinct and clear, or muddy and noisy?
  3. Musicality: The overall musical quality. Does it follow musical rules (harmony, rhythm) and is it pleasant to listen to?
  4. Coherence: The structural logic of the piece. Does the music progress naturally, or does it feel random and disjointed?
  5. Memorability: The "catchiness" of the track. How distinct and memorable is the melody or rhythm?

Overall Aesthetics Score: This is calculated by taking the average of the 5 individual metric scores.

Architecture

This model operates on top of the OpenAI Whisper encoder (specifically the fine-tuned version linked above).

  1. Audio Encoder: 30 seconds of audio $\to$ Whisper Encoder $\to$ Last Hidden State (1, 1500, 768).
  2. Feature Extraction:
    • The 1500 frames are split into 10 segments.
    • For each segment, we calculate Mean, Max, and Min pooling.
    • These are concatenated and flattened into a single vector of size 23,040.
  3. Aesthetics Model:
    • Bottleneck: Reduces the 23k input to 256 dimensions (Shared knowledge).
    • Expert Heads: 5 separate MLPs that predict the specific score for each metric.

Training

Trained on the SongEval benchmark: 2,399 songs, each rated by 16 expert annotators on a 1 to 5 Likert scale. SongEval audio is preprocessed to 30 s, 16 kHz mono and encoded to the frozen (1500, 768) hidden state before segment pooling. The Whisper encoder is frozen; only the bottleneck and the expert heads are trained. Both stages use a Huber loss and AdamW.

StageWhat is trainedLearning rateBatch sizeEpochs
1Shared bottleneck (23,040 to 1,024 to 256, LayerNorm, ReLU, 0.3 dropout) against the mean of the five dimensions1e-46460
2Each expert head (256 to 64 to 1) on its own dimension, bottleneck frozen, score-stratified WeightedRandomSampler over the 1 to 5 buckets5e-53250 per head

Inference Example

To use this model, you need librosa, transformers, torch, and huggingface_hub.

import os
import torch
import numpy as np
import librosa
from huggingface_hub import hf_hub_download
from transformers import WhisperModel, WhisperProcessor
from model_architecture import MusicAestheticsModel # Downloaded from this repo

# Configuration
# 1. The Audio Encoder (The Music Whisper Model)
WHISPER_REPO = "laion/music-whisper"
# 2. This Aesthetics Model
AESTHETICS_REPO = "laion/music-aesthetics"

DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

def load_models():
    print("Loading Whisper Encoder...")
    processor = WhisperProcessor.from_pretrained(WHISPER_REPO)
    # We only need the encoder part of Whisper
    whisper = WhisperModel.from_pretrained(WHISPER_REPO).encoder.to(DEVICE)
    whisper.eval()

    print("Loading Aesthetics Experts...")
    # Initialize the architecture
    model = MusicAestheticsModel().to(DEVICE)
    
    # Download and load weights
    # 1. Load Shared Bottleneck
    bt_path = hf_hub_download(repo_id=AESTHETICS_REPO, filename="stage1_bottleneck.pt")
    model.bottleneck.load_state_dict(torch.load(bt_path, map_location=DEVICE))
    
    # 2. Load Expert Heads
    for metric in model.metrics:
        head_path = hf_hub_download(repo_id=AESTHETICS_REPO, filename=f"expert_{metric}.pt")
        model.heads[metric].load_state_dict(torch.load(head_path, map_location=DEVICE))
    
    model.eval()
    return processor, whisper, model

def predict_score(audio_path, processor, whisper, aesthetic_model):
    # 1. Load and Preprocess Audio
    # Resample to 16kHz and pad/crop to exactly 30s
    audio, sr = librosa.load(audio_path, sr=16000)
    target_len = 16000 * 30
    if len(audio) > target_len:
        start = (len(audio) - target_len) // 2
        audio = audio[start : start + target_len]
    else:
        audio = np.pad(audio, (0, target_len - len(audio)))
        
    # 2. Extract Whisper Features
    inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
    with torch.no_grad():
        # Get last hidden state from encoder
        outputs = whisper(inputs.input_features.to(DEVICE))
        last_hidden = outputs.last_hidden_state # (1, 1500, 768)
        
        # 3. Apply Feature Pooling (Expert Model Logic)
        # Reshape to (1, 10 segments, 150 frames, 768 dim)
        feats = last_hidden.view(1, 10, 150, 768)
        
        mean_pool = torch.mean(feats, dim=2)        
        max_pool = torch.max(feats, dim=2).values   
        min_pool = torch.min(feats, dim=2).values   
        
        # Concat -> Flatten -> (23040,)
        concat = torch.cat([mean_pool, max_pool, min_pool], dim=2)
        embedding = concat.view(-1).unsqueeze(0) # Add batch dim

    # 4. Predict Scores
    with torch.no_grad():
        outputs = aesthetic_model(embedding)
    
    results = {k: v.item() for k, v in outputs.items()}
    
    # Calculate Average Global Score
    avg_score = sum(results.values()) / len(results)
    results["Overall_Aesthetics"] = avg_score
    
    return results

# Example Usage
if __name__ == "__main__":
    processor, whisper, model = load_models()
    
    # Replace with your audio file
    audio_file = "test_song.mp3" 
    
    if os.path.exists(audio_file):
        scores = predict_score(audio_file, processor, whisper, model)
        
        print("-" * 30)
        print(f"Aesthetics Analysis for {audio_file}")
        print("-" * 30)
        for metric, score in scores.items():
            print(f"{metric:<20}: {score:.2f} / 5.0")
        print("-" * 30)
    else:
        print("Please provide a valid audio file path.")

License

CC BY-NC-SA 4.0, inherited from the SongEval training data.

Citation

@inproceedings{kaczmarczyk2026laiontunes,
  title     = {{LAION-Tunes}: An Open 1.4{M}-Track Dataset and Perceptual Benchmark for {AI}-Generated Music},
  author    = {Kaczmarczyk, Robert and Ahmed, Tawsif and Friedrich, Felix and Erickson, Aidan C. and Sharoni, Orian and Herremans, Dorien and Schuhmann, Christoph},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS), Evaluations and Datasets Track},
  year      = {2026}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · torch · audio-classification

Можно запустить

Подбираем GPU…

Ревизия весов
f26ef77

0 моделей