Instructions to use dima806/music_genres_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/music_genres_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="dima806/music_genres_classification")# Load model directly from transformers import AutoProcessor, AutoModelForAudioClassification processor = AutoProcessor.from_pretrained("dima806/music_genres_classification") model = AutoModelForAudioClassification.from_pretrained("dima806/music_genres_classification") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,4 +4,31 @@ metrics:
|
|
| 4 |
- accuracy
|
| 5 |
- roc_auc
|
| 6 |
---
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- accuracy
|
| 5 |
- roc_auc
|
| 6 |
---
|
| 7 |
+
[Music genre](https://en.wikipedia.org/wiki/Music_genre) classification is a fundamental and versatile application in many various domains. Some possible use cases for music genre classification include:
|
| 8 |
+
|
| 9 |
+
- music recommendation systems;
|
| 10 |
+
- content organization and discovery;
|
| 11 |
+
- radio broadcasting and programming;
|
| 12 |
+
- music licensing and copyright management;
|
| 13 |
+
- music analysis and research;
|
| 14 |
+
- content tagging and metadata enrichment;
|
| 15 |
+
- audio identification and copyright protection;
|
| 16 |
+
- music production and creativity;
|
| 17 |
+
- healthcare and therapy;
|
| 18 |
+
- entertainment and gaming.
|
| 19 |
+
|
| 20 |
+
The model is trained based on publicly available dataset of labeled music data — [GTZAN Dataset](https://www.kaggle.com/datasets/andradaolteanu/gtzan-dataset-music-genre-classification) — that contains 1000 sample 30-second audio files evenly split among 10 genres:
|
| 21 |
+
|
| 22 |
+
- blues;
|
| 23 |
+
- classical;
|
| 24 |
+
- country;
|
| 25 |
+
- disco;
|
| 26 |
+
- hip-hop;
|
| 27 |
+
- jazz;
|
| 28 |
+
- metal;
|
| 29 |
+
- pop;
|
| 30 |
+
- reggae;
|
| 31 |
+
- rock.
|
| 32 |
+
|
| 33 |
+
The final code is available as a [Kaggle notebook](https://www.kaggle.com/code/dima806/music-genre-classification-wav2vec2-base-960h).
|
| 34 |
+
See also [my Medium article](https://medium.com/data-and-beyond/building-a-free-advanced-music-genre-classification-pipeline-using-machine-learning-654b0de7cc3e) for more details.
|