OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Music Genre Classification

Music Genre Classification is a Python research repository that processes music audio and compares recurrent neural network and Transformer models for multi-label genre classification.

Independent OpenViST project profile, based on linked sources.

Music Genre Classification — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want a code-based starting point for studying or adapting music genre classification with the FMA dataset, rather than a hosted audio-labeling service.

Who it is for

  • Developers exploring audio classification and music machine learning.
  • Researchers or learners comparing recurrent and Transformer approaches on a labeled music dataset.
  • Python users who want to adapt a local pipeline for genre tagging.

Documented uses

  • Prepare FMA metadata and audio for model training.
  • Convert audio into processed NumPy data files.
  • Train a recurrent or Transformer genre classifier.
  • Run the prediction script on new MP3 files.
Before you choose

Requirements & limits

  • The README's dataset workflow uses the FMA large archive, described as 93 GB.
  • The task is multi-label classification across 163 targets, with pronounced genre imbalance.
  • Audio is represented as Mel-spectrograms before model processing.
  • The repository is Python code licensed under MIT.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Prepare FMA audio and train a genre classifier

Set up the documented dataset workflow and start training either the recurrent or Transformer model.

Before you start

  • Python and the repository's requirements.txt
  • FMA dataset files fma_metadata.zip and fma_large.zip
  • Correct file paths for the project scripts

Steps

  1. Install the environment with the command below.

    Documented command
    python -m pip install -r requirements.txt
  2. Uncompress fma_metadata.zip and fma_large.zip.

  3. Run prepare_data.py with the correct paths to generate mapping files.

  4. Run audio_processing.py with the correct paths to generate .npy files.

  5. Start training with rnn_genre_classification.py or trsf_genre_classification.py.

Expected outcome

The documented preparation pipeline produces mapping and NumPy data files for training one of the two model implementations.

Guide limitations

  • The README does not provide exact path values or training options.
  • The FMA large dataset is described as 93 GB.
  • The dataset's genre distribution is highly imbalanced.
Source-based practical guide

Run genre prediction on MP3 files

Use the repository's prediction script with new MP3 files.

Before you start

  • The project environment installed from requirements.txt
  • MP3 files and correct paths for predict.py

Steps

  1. Install the environment with the command below.

    Documented command
    python -m pip install -r requirements.txt
  2. Run predict.py with the correct paths for the input MP3 files.

Expected outcome

The README identifies predict.py as the script for predicting on new MP3s.

Guide limitations

  • The README does not specify the command-line arguments, output format, or model-selection details.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
CVxTz/music_genre_classification · Official homepage title · retained in its source language