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.
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.
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
Install the environment with the command below.
python -m pip install -r requirements.txtUncompress fma_metadata.zip and fma_large.zip.
Run prepare_data.py with the correct paths to generate mapping files.
Run audio_processing.py with the correct paths to generate .npy files.
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.
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
Install the environment with the command below.
python -m pip install -r requirements.txtRun 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.
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

