music classification at soundcloud

31

Upload: petko-nikolov

Post on 19-Jul-2015

198 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Music Classification at SoundCloud
Page 2: Music Classification at SoundCloud

Music Classification at SoundCloud

29.10.2013 @ Sofia University

Lecturers: Petko Nikolov, Vassil Lunchev

Automatic prediction of genres, instruments, moods and vocals

Page 3: Music Classification at SoundCloud

reaches 250 million people

189 in the world by Alexa.com

12 hours audio uploaded every minute

The biggest sound platform

Page 4: Music Classification at SoundCloud

SofiaRecommender

Auto-Tagger

Page 5: Music Classification at SoundCloud

Auto-Tagger

Improve the meta-information

Page 6: Music Classification at SoundCloud

Music Tagging: Defining the Problem

● given a track’s audio signal, find the most relevant tags from each set: genres, moods, instruments, vocals

SoundCloudMusic Tagger

Rock

Punk

Euphoric

String Instruments

Guitar

Male Vocal

Page 7: Music Classification at SoundCloud

System Overview: New sound

Feature Extraction

ClassificationTakingDecision

vector of real values

TAGS

Page 8: Music Classification at SoundCloud

System Overview: Building blocks

Feature Extraction

ClassificationTakingDecision

vector of real values

TAGS

TaxonomyDataset

Page 9: Music Classification at SoundCloud

Classification

● one of the problems of Machine Learning

● given a set of categories C, identify the subset of categories a new observation belongs to

● usually solved by statistical model that uses past data with known categories to adjust its parameters, i.e. classifier

Page 10: Music Classification at SoundCloud

Classification tasks by output type

● binary classification: each observation belongs to exactly 1 of 2 given categories

● multi-class classification: each observation belongs to exactly 1 of N categories, N > 2

● multi-label classification: each observation belongs to a subset of the set of categories

Page 11: Music Classification at SoundCloud

Observations /Examples/

● used as input data for a classification model

● represented by vector x with fixed size D

● each dimension of the vector is called attribute (feature)

● attributes could be of several different types,we’re gonna focus on ones with continuous values

Page 12: Music Classification at SoundCloud

● supervised learning uses past set of observations XNxD with known labels YN to learn a model able to predict accurately the labels of new observations

Supervised learning

x1

x2

w0 + w1 x1 + w2 x2

Page 13: Music Classification at SoundCloud

● not a trivial problem

● labeled data is usually expensive to collect

● existing research musical labeled datasets are ridiculously small

● SoundCloud dataset○ user-defined tags to infer the true ones○ many heuristics and tuning techniques to remove

the noise

Having data to learn from

Page 14: Music Classification at SoundCloud

Feature extraction: overview

Discrete Fourier Transform (DFT)

Magnitude Spectrum

Feature Transform Summarization

Page 15: Music Classification at SoundCloud

● transforms a signal from time to frequency domain

DFTA

mpl

itude

Time

Pow

er

Frequency

● representing the signal as combination of sinusoidal waves with different frequency

Page 16: Music Classification at SoundCloud

Feature extraction process

Page 17: Music Classification at SoundCloud

Feature Transform

40 ms

Feature extraction process

Frame

Page 18: Music Classification at SoundCloud

Feature Transform

40 ms

Feature extraction process

Frame

DFT

Page 19: Music Classification at SoundCloud

Feature Transform

40 ms

Feature

Transform

Feature extraction process

Frame

DFT x

single value per feature transform

Page 20: Music Classification at SoundCloud

Feature Transform

40 ms

Feature

Transform

Feature extraction process

Frame

DFT x

single value per feature transformmove 20 ms

Page 21: Music Classification at SoundCloud

● for each feature transform we obtain a sequence of real values

Feature extraction process

20 ms

Page 22: Music Classification at SoundCloud

● for each feature transform we obtain a sequence of real values

Feature extraction process

20 ms

1 secondMeanStd

Page 23: Music Classification at SoundCloud

● for each feature transform we obtain a sequence of real values

Feature extraction process

20 ms

1 secondMeanStd

30 secondsMean(Means)Mean(Stds)

Std(Means)Std(Stds)

Page 24: Music Classification at SoundCloud

Spectral Variation

● take two consecutive frames

● apply DFT on each of them

● calculate the correlation between the power frequencies

● normalize it

Page 25: Music Classification at SoundCloud

● we have multi-label classification task to solve

How?

● divide it to N binary classification tasks, one for each tag

● train one binary classifier per tag able to output confidence score

Building classifier

Page 26: Music Classification at SoundCloud

Taking Decision

● so now we obtained confidence scores

Rock

0.7

Electronic

0.2

Grunge

0.8

Classical

0.3

● how to take a decision which tags to be positive?

Page 27: Music Classification at SoundCloud

● tags are not independent

● in genre’s case they are organized in a tree

Taxonomy-based decisions

Classical

Opera DubstepHouse

Techno

Rock

PunkAlternative

Electronic Hip-Hop

MixtapeTrap

Jazz

Swing

Page 28: Music Classification at SoundCloud

● tags are not independent

● in genre’s case they are organized in a tree

Taxonomy-based decisions

Classical JazzHip-HopElectronicRock

Opera PunkAlternative Dubstep

HouseTechno

MixtapeTrap

Swing

0.3 0.7

0.2 0.6 0.8

0.3

0.1 0.20.1 0.4

0.3

0.2

0.1

0.2

Page 29: Music Classification at SoundCloud

● tags are not independent

● in genre’s case they are organized in a tree

Taxonomy-based decisions

Classical JazzHip-HopElectronicRock

Opera PunkAlternative Dubstep

HouseTechno

MixtapeTrap

Swing

0.3 0.7

0.2 0.6 0.8

0.3

0.1 0.20.1 0.4

0.3

0.2

0.1

0.2

Page 30: Music Classification at SoundCloud

Amazon AWS

System Architecture

S3new

Message broker

workersworkers

workersworkers

EC2

Inserter

MySQL API

class

ify th

is

result

House

Stores the results for each sound

APIAPI

RabbitMQ

all sounds

Reclassifying the whole catalogue

Page 31: Music Classification at SoundCloud

Thank you