Skip to content

Unofficial code for paper: Transformer-based approach towards music emotion recognition from lyrics.

Notifications You must be signed in to change notification settings

plusoneee/mtl.lyrics.classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Multi-tasks for Lyrics Classifcation

Unofficial code for paper: Transformer-based approach towards music emotion recognition from lyrics

Requirements

  • Pytorch (1.10.1+cu113)
  • Numpy
  • Pandas
  • Tensorboard
  • Transformers (3.0.0)

Datasets

We used MoodyLyrcis dataset for this repo. Due to potential copyright issues, cannot share the training data.

  1. You have to put train.csv and test.csv in folder ./multitask/data/.
  2. The csv columns we used be like:
index,artist,song,mood,lyric
  1. Only need two columns: mood and lyric in the training process. You can adjust the costom dataset multitasks/utils/dataset.py to fit your own dataset.

Enviroment Setup

  1. PyTorch with CUDA-enabled GPU.
  2. Change hyper-parameters at file: ./multitask/config.py (Optional)

Run Training

Follow these stepes to run:

cd multitasks
python main.py

Results

Run command:

tensorboard --logdir='{log_path_you_define_at_config.py}'

Tensorboard screen shot

About

Unofficial code for paper: Transformer-based approach towards music emotion recognition from lyrics.

Topics

Resources

Stars

Watchers

Forks

Languages