{"id":13514310,"url":"https://github.com/mdeff/fma","last_synced_at":"2025-05-15T10:05:26.072Z","repository":{"id":40267362,"uuid":"75407467","full_name":"mdeff/fma","owner":"mdeff","description":"FMA: A Dataset For Music Analysis","archived":false,"fork":false,"pushed_at":"2023-01-05T15:15:38.000Z","size":4182,"stargazers_count":2367,"open_issues_count":16,"forks_count":447,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-04-14T16:55:19.993Z","etag":null,"topics":["dataset","deep-learning","music-analysis","music-information-retrieval","open-data","open-science","reproducible-research"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1612.01840","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdeff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-02T15:27:37.000Z","updated_at":"2025-04-12T17:23:53.000Z","dependencies_parsed_at":"2023-02-04T06:46:39.611Z","dependency_job_id":null,"html_url":"https://github.com/mdeff/fma","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdeff%2Ffma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdeff%2Ffma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdeff%2Ffma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdeff%2Ffma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdeff","download_url":"https://codeload.github.com/mdeff/fma/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319716,"owners_count":22051072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataset","deep-learning","music-analysis","music-information-retrieval","open-data","open-science","reproducible-research"],"created_at":"2024-08-01T05:00:52.423Z","updated_at":"2025-05-15T10:05:21.010Z","avatar_url":"https://github.com/mdeff.png","language":"Jupyter Notebook","readme":"# FMA: A Dataset For Music Analysis\n\n[Michaël Defferrard](https://deff.ch),\n[Kirell Benzi](https://kirellbenzi.com),\n[Pierre Vandergheynst](https://people.epfl.ch/pierre.vandergheynst),\n[Xavier Bresson](https://www.ntu.edu.sg/home/xbresson). \\\nInternational Society for Music Information Retrieval Conference (ISMIR), 2017.\n\n\u003e We introduce the Free Music Archive (FMA), an open and easily accessible\n\u003e dataset suitable for evaluating several tasks in MIR, a field concerned with\n\u003e browsing, searching, and organizing large music collections. The community's\n\u003e growing interest in feature and end-to-end learning is however restrained by\n\u003e the limited availability of large audio datasets. The FMA aims to overcome\n\u003e this hurdle by providing 917 GiB and 343 days of Creative Commons-licensed\n\u003e audio from 106,574 tracks from 16,341 artists and 14,854 albums, arranged in\n\u003e a hierarchical taxonomy of 161 genres. It provides full-length and\n\u003e high-quality audio, pre-computed features, together with track- and\n\u003e user-level metadata, tags, and free-form text such as biographies. We here\n\u003e describe the dataset and how it was created, propose a train/validation/test\n\u003e split and three subsets, discuss some suitable MIR tasks, and evaluate some\n\u003e baselines for genre recognition. Code, data, and usage examples are available\n\u003e at \u003chttps://github.com/mdeff/fma\u003e.\n\n* Paper: [`arXiv:1612.01840`][paper] ([latex and reviews](https://github.com/mdeff/paper-fma-ismir2017))\n* Slides: [`doi:10.5281/zenodo.1066119`](https://doi.org/10.5281/zenodo.1066119)\n* Poster: [`doi:10.5281/zenodo.1035847`](https://doi.org/10.5281/zenodo.1035847)\n\n[paper]: https://arxiv.org/abs/1612.01840\n[FMA]: https://freemusicarchive.org\n\n## Data\n\nAll metadata and features for all tracks are distributed in **[`fma_metadata.zip`]** (342 MiB).\nThe below tables can be used with [pandas] or any other data analysis tool.\nSee the [paper] or the [`usage.ipynb`] notebook for a description.\n* `tracks.csv`: per track metadata such as ID, title, artist, genres, tags and play counts, for all 106,574 tracks.\n* `genres.csv`: all 163 genres with name and parent (used to infer the genre hierarchy and top-level genres).\n* `features.csv`: common features extracted with [librosa].\n* `echonest.csv`: audio features provided by [Echonest] (now [Spotify]) for a subset of 13,129 tracks.\n\n[pandas]:   https://pandas.pydata.org/\n[librosa]:  https://librosa.org/\n[spotify]:  https://www.spotify.com/\n[echonest]: https://web.archive.org/web/20170519050040/http://the.echonest.com/\n\nThen, you got various sizes of MP3-encoded audio data:\n\n1. **[`fma_small.zip`]**: 8,000 tracks of 30s, 8 balanced genres (GTZAN-like) (7.2 GiB)\n2. **[`fma_medium.zip`]**: 25,000 tracks of 30s, 16 unbalanced genres (22 GiB)\n3. **[`fma_large.zip`]**: 106,574 tracks of 30s, 161 unbalanced genres (93 GiB)\n4. **[`fma_full.zip`]**: 106,574 untrimmed tracks, 161 unbalanced genres (879 GiB)\n\n[`fma_metadata.zip`]: https://os.unil.cloud.switch.ch/fma/fma_metadata.zip\n[`fma_small.zip`]:    https://os.unil.cloud.switch.ch/fma/fma_small.zip\n[`fma_medium.zip`]:   https://os.unil.cloud.switch.ch/fma/fma_medium.zip\n[`fma_large.zip`]:    https://os.unil.cloud.switch.ch/fma/fma_large.zip\n[`fma_full.zip`]:     https://os.unil.cloud.switch.ch/fma/fma_full.zip\n\nSee the [wiki](https://github.com/mdeff/fma/wiki) (or [#41](https://github.com/mdeff/fma/issues/41)) for **known issues (errata)**.\n\n## Code\n\nThe following notebooks, scripts, and modules have been developed for the dataset.\n\n1. [`usage.ipynb`]: shows how to load the datasets and develop, train, and test your own models with it.\n2. [`analysis.ipynb`]: exploration of the metadata, data, and features.\n   Creates the [figures](https://github.com/mdeff/fma/tree/outputs/figures) used in the paper.\n3. [`baselines.ipynb`]: baseline models for genre recognition, both from audio and features.\n4. [`features.py`]: features extraction from the audio (used to create `features.csv`).\n5. [`webapi.ipynb`]: query the web API of the [FMA]. Can be used to update the dataset.\n6. [`creation.ipynb`]: creation of the dataset (used to create `tracks.csv` and `genres.csv`).\n7. [`creation.py`]: creation of the dataset (long-running data collection and processing).\n8. [`utils.py`]: helper functions and classes.\n\n[`usage.ipynb`]:     https://nbviewer.jupyter.org/github/mdeff/fma/blob/outputs/usage.ipynb\n[`analysis.ipynb`]:  https://nbviewer.jupyter.org/github/mdeff/fma/blob/outputs/analysis.ipynb\n[`baselines.ipynb`]: https://nbviewer.jupyter.org/github/mdeff/fma/blob/outputs/baselines.ipynb\n[`features.py`]:     features.py\n[`webapi.ipynb`]:    https://nbviewer.jupyter.org/github/mdeff/fma/blob/outputs/webapi.ipynb\n[`creation.ipynb`]:  https://nbviewer.jupyter.org/github/mdeff/fma/blob/outputs/creation.ipynb\n[`creation.py`]:     creation.py\n[`utils.py`]:        utils.py\n\n## Usage\n\n[![Binder](https://static.mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/mdeff/fma/outputs?urlpath=lab/tree/usage.ipynb)\n\u0026nbsp; Click the binder badge to play with the code and data from your browser without installing anything.\n\n1. Clone the repository.\n    ```sh\n    git clone https://github.com/mdeff/fma.git\n    cd fma\n    ```\n\n1. \u003cdetails\u003e\u003csummary\u003eCreate a Python 3.6 environment.\u003c/summary\u003e\n\n    ```sh\n    # with https://conda.io\n    conda create -n fma python=3.6\n    conda activate fma\n\n    # with https://github.com/pyenv/pyenv\n    pyenv install 3.6.0\n    pyenv virtualenv 3.6.0 fma\n    pyenv activate fma\n\n    # with https://pipenv.pypa.io\n    pipenv --python 3.6\n    pipenv shell\n\n    # with https://docs.python.org/3/tutorial/venv.html\n    python3.6 -m venv ./env\n    source ./env/bin/activate\n    ```\n    \u003c/details\u003e\n\n1. Install dependencies.\n    ```sh\n    pip install --upgrade pip setuptools wheel\n    pip install numpy==1.12.1  # workaround resampy's bogus setup.py\n    pip install -r requirements.txt\n    ```\n    Note: you may need to install [ffmpeg](https://ffmpeg.org/download.html) or [graphviz](https://www.graphviz.org) depending on your usage.\\\n    Note: install [CUDA](https://en.wikipedia.org/wiki/CUDA) to train neural networks on GPUs (see [Tensorflow's instructions](https://www.tensorflow.org/install/)).\n\n1. Download some data, verify its integrity, and uncompress the archives.\n    ```sh\n    cd data\n\n    curl -O https://os.unil.cloud.switch.ch/fma/fma_metadata.zip\n    curl -O https://os.unil.cloud.switch.ch/fma/fma_small.zip\n    curl -O https://os.unil.cloud.switch.ch/fma/fma_medium.zip\n    curl -O https://os.unil.cloud.switch.ch/fma/fma_large.zip\n    curl -O https://os.unil.cloud.switch.ch/fma/fma_full.zip\n\n    echo \"f0df49ffe5f2a6008d7dc83c6915b31835dfe733  fma_metadata.zip\" | sha1sum -c -\n    echo \"ade154f733639d52e35e32f5593efe5be76c6d70  fma_small.zip\"    | sha1sum -c -\n    echo \"c67b69ea232021025fca9231fc1c7c1a063ab50b  fma_medium.zip\"   | sha1sum -c -\n    echo \"497109f4dd721066b5ce5e5f250ec604dc78939e  fma_large.zip\"    | sha1sum -c -\n    echo \"0f0ace23fbe9ba30ecb7e95f763e435ea802b8ab  fma_full.zip\"     | sha1sum -c -\n\n    unzip fma_metadata.zip\n    unzip fma_small.zip\n    unzip fma_medium.zip\n    unzip fma_large.zip\n    unzip fma_full.zip\n\n    cd ..\n    ```\n\n    Note: try [7zip](https://www.7-zip.org) if decompression errors.\n    It might be an [unsupported compression issue](https://github.com/mdeff/fma/issues/5).\n\n1. Fill a `.env` configuration file (at repository's root) with the following content.\n    ```\n    AUDIO_DIR=./data/fma_small/  # the path to a decompressed fma_*.zip\n    FMA_KEY=MYKEY  # only if you want to query the freemusicarchive.org API\n    ```\n\n1. Open Jupyter or run a notebook.\n    ```sh\n    jupyter notebook\n    make usage.ipynb\n    ```\n\n## Impact, coverage, and resources\n\n\u003cdetails\u003e\u003csummary\u003e100+ research papers\u003c/summary\u003e\n\nFull list on [Google Scholar](https://scholar.google.com/scholar?cites=13646959466952873682,13785796238335741238,7544459641098681164,5736399534855095976).\nSome picks below.\n\n* [Zero-shot Learning for Audio-based Music Classification and Tagging](https://arxiv.org/abs/1907.02670)\n* [One deep music representation to rule them all? A comparative analysis of different representation learning strategies](https://doi.org/10.1007/s00521-019-04076-1)\n* [Deep Learning for Audio-Based Music Classification and Tagging: Teaching Computers to Distinguish Rock from Bach](https://sci-hub.tw/10.1109/MSP.2018.2874383)\n* [Learning Discrete Structures for Graph Neural Networks](https://arxiv.org/abs/1903.11960)\n* [A context encoder for audio inpainting](https://arxiv.org/abs/1810.12138)\n* [OpenMIC-2018: An Open Data-set for Multiple Instrument Recognition](https://archives.ismir.net/ismir2018/paper/000248.pdf)\n* [Detecting Music Genre Using Extreme Gradient Boosting](https://doi.org/10.1145/3184558.3191822)\n* [Transfer Learning of Artist Group Factors to Musical Genre Classification](https://doi.org/10.1145/3184558.3191823)\n* [Learning to Recognize Musical Genre from Audio: Challenge Overview](https://arxiv.org/abs/1803.05337)\n* [Representation Learning of Music Using Artist Labels](https://arxiv.org/abs/1710.06648)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e2 derived works\u003c/summary\u003e\n\n* [OpenMIC-2018: An Open Data-set for Multiple Instrument Recognition](https://github.com/cosmir/openmic-2018)\n* [ConvNet features](https://github.com/keunwoochoi/FMA_convnet_features) from [Transfer learning for music classification and regression tasks](https://arxiv.org/abs/1703.09179)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e~10 posts\u003c/summary\u003e\n\n* [Music Genre Classification With TensorFlow](https://towardsdatascience.com/music-genre-classification-with-tensorflow-3de38f0d4dbb), Towards Data Science, 2020-08-11.\n* [Music Genre Classification: Transformers vs Recurrent Neural Networks](https://towardsdatascience.com/music-genre-classification-transformers-vs-recurrent-neural-networks-631751a71c58), Towards Data Science, 2020-06-14.\n* [Using CNNs and RNNs for Music Genre Recognition](https://towardsdatascience.com/using-cnns-and-rnns-for-music-genre-recognition-2435fb2ed6af), Towards Data Science, 2018-12-13.\n* [Over 1.5 TB’s of Labeled Audio Datasets](https://towardsdatascience.com/a-data-lakes-worth-of-audio-datasets-b45b88cd4ad), Towards Data Science, 2018-11-13.\n* [Discovering Descriptive Music Genres Using K-Means Clustering](https://medium.com/latinxinai/discovering-descriptive-music-genres-using-k-means-clustering-d19bdea5e443), Medium, 2018-04-09.\n* [25 Open Datasets for Deep Learning Every Data Scientist Must Work With](https://www.analyticsvidhya.com/blog/2018/03/comprehensive-collection-deep-learning-datasets/), Analytics Vidhya, 2018-03-29.\n* [Learning Music Genres](https://medium.com/@diegoagher/learning-music-genres-5ab1cabadfed), Medium, 2017-12-13.\n* [music2vec: Generating Vector Embeddings for Genre-Classification Task](https://medium.com/@rajatheb/music2vec-generating-vector-embedding-for-genre-classification-task-411187a20820), Medium, 2017-11-28.\n* [A Music Information Retrieval Dataset, Made With FMA](https://web.archive.org/web/20190907182116/http://freemusicarchive.org/member/cheyenne_h/blog/A_Music_Information_Retrieval_Dataset_Made_With_FMA), freemusicarchive.org, 2017-05-22.\n* [Pre-publication release announced](https://twitter.com/m_deff/status/861985446116589569), twitter.com, 2017-05-09.\n* [FMA: A Dataset For Music Analysis](https://tensorflow.blog/2017/03/14/fma-a-dataset-for-music-analysis), tensorflow.blog, 2017-03-14.\n* [Beta release discussed](https://twitter.com/YadFaeq/status/829406463286063104), twitter.com, 2017-02-08.\n* [FMA Data Set for Researchers Released](https://web.archive.org/web/20190826112752/http://freemusicarchive.org/member/cheyenne_h/blog/FMA_Dataset_for_Researchers), freemusicarchive.org, 2016-12-15.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e5 events\u003c/summary\u003e\n\n* [Summer Workshop](https://hcdigitalscholarship.github.io/audio-files) by the [Haverford Digital Scholarship Library](https://www.haverford.edu/library/digital-scholarship), 2020-07.\n* [Genre recognition challenge](https://www.crowdai.org/challenges/www-2018-challenge-learning-to-recognize-musical-genre) at the [Web Conference](https://www2018.thewebconf.org/program/challenges-track/), Lyon, 2018-04.\n* [Slides](https://doi.org/10.5281/zenodo.1066119) presented at the [Data Jam days](http://datajamdays.org), Lausanne, 2017-11-24.\n* [Poster](https://doi.org/10.5281/zenodo.1035847) presented at [ISMIR 2017](https://ismir2017.ismir.net), Suzhou, 2017-10-24.\n* [Slides](https://doi.org/10.5281/zenodo.999353) for the [Open Science in Practice](https://osip2017.epfl.ch) summer school at EPFL, 2017-09-29.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e~10 dataset lists\u003c/summary\u003e\n\n* \u003chttps://github.com/caesar0301/awesome-public-datasets\u003e\n* \u003chttps://archive.ics.uci.edu/ml/datasets/FMA:+A+Dataset+For+Music+Analysis\u003e\n* \u003chttp://deeplearning.net/datasets\u003e\n* \u003chttp://www.audiocontentanalysis.org/data-sets\u003e\n* \u003chttps://github.com/ismir/mir-datasets\u003e\n* \u003chttps://teachingmir.wikispaces.com/Datasets\u003e\n* \u003chttps://en.wikipedia.org/wiki/List_of_datasets_for_machine_learning_research\u003e\n* \u003chttps://loc.gov/item/2018655052\u003e\n* \u003chttps://cloudlab.atlassian.net/wiki/display/datasets/FMA:+A+Dataset+For+Music+Analysis\u003e\n* \u003chttps://www.datasetlist.com\u003e\n* \u003chttps://data-flair.training/blogs/deep-learning-project-ideas\u003e\n\n\u003c/details\u003e\n\n## Contributing\n\nContribute by opening an [issue](https://github.com/mdeff/fma/issues) or a [pull request](https://github.com/mdeff/fma/pulls).\nLet this repository be a hub around the dataset!\n\n## History\n\n**2017-05-09 pre-publication release**\n* paper: [arXiv:1612.01840v2](https://arxiv.org/abs/1612.01840v2)\n* code: [git tag rc1](https://github.com/mdeff/fma/releases/tag/rc1)\n* `fma_metadata.zip` sha1: `f0df49ffe5f2a6008d7dc83c6915b31835dfe733`\n* `fma_small.zip`    sha1: `ade154f733639d52e35e32f5593efe5be76c6d70`\n* `fma_medium.zip`   sha1: `c67b69ea232021025fca9231fc1c7c1a063ab50b`\n* `fma_large.zip`    sha1: `497109f4dd721066b5ce5e5f250ec604dc78939e`\n* `fma_full.zip`     sha1: `0f0ace23fbe9ba30ecb7e95f763e435ea802b8ab`\n* known issues: see [#41](https://github.com/mdeff/fma/issues/41)\n\n**2016-12-06 beta release**\n* paper: [arXiv:1612.01840v1](https://arxiv.org/abs/1612.01840v1)\n* code: [git tag beta](https://github.com/mdeff/fma/releases/tag/beta)\n* `fma_small.zip`  sha1: `e731a5d56a5625f7b7f770923ee32922374e2cbf`\n* `fma_medium.zip` sha1: `fe23d6f2a400821ed1271ded6bcd530b7a8ea551`\n\n## Acknowledgments and Licenses\n\nWe are grateful to the [Swiss Data Science Center] ([EPFL] and [ETHZ]) for hosting the dataset.\n\nPlease cite our work if you use our code or data.\n\n```\n@inproceedings{fma_dataset,\n  title = {{FMA}: A Dataset for Music Analysis},\n  author = {Defferrard, Micha\\\"el and Benzi, Kirell and Vandergheynst, Pierre and Bresson, Xavier},\n  booktitle = {18th International Society for Music Information Retrieval Conference (ISMIR)},\n  year = {2017},\n  archiveprefix = {arXiv},\n  eprint = {1612.01840},\n  url = {https://arxiv.org/abs/1612.01840},\n}\n```\n\n```\n@inproceedings{fma_challenge,\n  title = {Learning to Recognize Musical Genre from Audio},\n  subtitle = {Challenge Overview},\n  author = {Defferrard, Micha\\\"el and Mohanty, Sharada P. and Carroll, Sean F. and Salath\\'e, Marcel},\n  booktitle = {The 2018 Web Conference Companion},\n  year = {2018},\n  publisher = {ACM Press},\n  isbn = {9781450356404},\n  doi = {10.1145/3184558.3192310},\n  archiveprefix = {arXiv},\n  eprint = {1803.05337},\n  url = {https://arxiv.org/abs/1803.05337},\n}\n```\n\n* The code in this repository is released under the [MIT license](LICENSE.txt).\n* The metadata is released under the [Creative Commons Attribution 4.0 International License (CC BY 4.0)][ccby40].\n* We do not hold the copyright on the audio and distribute it under the license chosen by the artist.\n* The dataset is meant for research purposes.\n\n[ccby40]: https://creativecommons.org/licenses/by/4.0\n[Swiss Data Science Center]: https://datascience.ch/collaboration-and-partnerships\n[EPFL]: https://www.epfl.ch\n[ETHZ]: https://www.ethz.ch\n","funding_links":[],"categories":["deep-learning","Datasets","Jupyter Notebook","By Language","Music","Uncategorized","Themed Directories"],"sub_categories":["Data Science","Natural Language Understanding","Uncategorized","Music"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdeff%2Ffma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdeff%2Ffma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdeff%2Ffma/lists"}