AI-Generated Music Detector
This repository contains the pre-trained hierarchical classifiers and scalers from the paper Detecting AI-Generated Music. It is designed to distinguish between human-composed music and AI-generated music (e.g., Suno, Udio) using a combination of Essentia descriptors and CLAP embeddings.
Model Details
- Model Type: Hierarchical Classifier (scikit-learn)
- License: MIT
- Original Repository: lcrosvila/ai-music-detection
Intended Use
This model is intended for researchers and developers looking to classify audio tracks as human-made or AI-generated. It requires extracting audio features using essentia and generating embeddings via the pre-trained LAION CLAP model before passing the data to this classifier.
How to Use
You can load the models and scaler directly in Python:
from huggingface_hub import hf_hub_download
import pickle
# Download the model file from Hugging Face
model_path = hf_hub_download(repo_id="lcros/ai-music-detection", filename="models_and_scaler.pkl")
# Load the classifiers and scaler
with open(model_path, 'rb') as f:
artifacts = pickle.load(f)
scaler = artifacts['scaler']
models = artifacts['models']
# (Note: Ensure you have calculated the Essentia descriptors and CLAP embeddings first)
# X_scaled = scaler.transform(X_features)
# for name, model in models.items():
# prediction = model.predict(X_scaled)