The project aims to create a classifier of musical genres and to perform a neural style transfer between two audio tracks using spectrograms
Project was developed for "Laboratorio di Intelligenza Artificiale" class, Ingegneria Informatica e Automatica, Università La Sapienza
Two different approaches were used for the classification, one based on Image Augumentation technique and another that uses the features of the audio tracks stored in a .csv file. For the first approach PyTorch was used while there is an implementation in PyTorch and one in Tensorflow for the classification through features. Similarly, there are implementations in both frameworks for neural style transfer
Already provided
Download GTZAN dataset here, unzip it and replace the GTZAN Dataset (Reduced) folder
[!] WIP: migrate installation from Colab to local environment
The whole project is structured to be run through Google Colab with the datasets uploaded to Google Drive. In particular, it is necessary to download the datasets and structure the Google Drive folders as follows by inserting the Colab Notebooks
folder in the Google Drive home:
.
├── data
│ ├── input
│ │ ├── NST
│ │ └── GC
│ │ └── GTZAN Dataset (Reduced)
│ └── output
│ └── NST
│ ├── PyTorch
│ └── Tensorflow
├── test
├── models
│ ├── PyTorch
│ │ ├── GC_csv
│ │ ├── GC_audioaug
│ │ └── GC_imgaug
│ └── Tensorflow
│ └── GC_csv
├── models
│ ├── csv
│ │ └── GC_pytorch_tensorflow_csv.ipynb
│ └── Data Augmentation
│ ├── GC_pytorch_img.ipynb
│ └── GC_pytorch_audio.ipynb
└── NST
├── NST_plots.ipynb
├── NST_pytorch.ipynb
└── NST_tensorflow.ipynb
Run a notebook from NST
or GC
folder using the GPU runtime provided by Colab whenever possible
- Convert scripts to Tensorflow v2.0
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Lorenzo Palaia - lorenzopalaia53@gmail.com
Project Link: https://github.com/lorenzopalaia/Neural-Style-Transfer-and-Genre-Classification