Skip to content

The project aims to leverage Convolutional Neural Networks (CNN) to automatically classify music genres based on album cover images. The system will be trained to identify intricate patterns and features within album cover art, enabling it to make accurate predictions about the corresponding music genre.

Notifications You must be signed in to change notification settings

thomasantony12/Music-genre-classification-using-cnn

Repository files navigation

Music Genre Classification using CNN

This project aims to classify music genres using spectrogram images generated from audio files. It utilizes Convolutional Neural Networks (CNNs) to learn features from the spectrogram images and predict the genre of the music.

Features

  • Converts audio files to spectrogram images
  • Utilizes MinMaxScaler for feature scaling
  • Resizes spectrogram images to match the input size of the CNN model
  • Predicts music genre using a trained CNN model
  • Supports various music genres including Blues, Classical, Country, Disco, Hiphop, Jazz, Metal, Pop, Reggae, and Rock

Requirements

  • Python 3.x
  • numpy
  • librosa
  • matplotlib
  • cv2
  • tensorflow
  • scikit-learn

Installation

Clone the repository:

git clone https://github.com/thomasantony12/Music-genre-classification-using-cnn.git

Install the required dependencies:

pip install -r requirements.txt

Usage

Place your audio files in the specified directory. Run the script classify_music.py to generate spectrogram images and predict the music genre:

python classify_music.py

The predicted genre for each audio file will be displayed in the console.

Model

The classification model used in this project is a pre-trained CNN model trained on a large dataset of spectrogram images.

Dataset

The dataset used for training and testing is "GTZAN Dataset - Music Genre Classification", the model consists of audio files from various music genres. Each audio file is manually labeled with its corresponding genre.

About

The project aims to leverage Convolutional Neural Networks (CNN) to automatically classify music genres based on album cover images. The system will be trained to identify intricate patterns and features within album cover art, enabling it to make accurate predictions about the corresponding music genre.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages