Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
推しと始めるMIR
Search
てーとく
February 13, 2020
Programming
0
800
推しと始めるMIR
アイドルのファンになったことをきっかけに機械学習の分野の一つであるMIR(音楽情報検索)に入門したので、MIRについて紹介しつつ作ったものの話とかをゆるふわにしようと思います!
てーとく
February 13, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
React Native × React Router v7 API通信の共通化で考えるべきこと
suguruooki
0
100
Patterns of Patterns
denyspoltorak
0
1.4k
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
CSC307 Lecture 02
javiergs
PRO
1
780
Package Management Learnings from Homebrew
mikemcquaid
0
230
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
MUSUBIXとは
nahisaho
0
140
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
140
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
AI & Enginnering
codelynx
0
120
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
950
Design in an AI World
tapps
0
150
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
Practical Orchestrator
shlominoach
191
11k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
Statistics for Hackers
jakevdp
799
230k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
83
Transcript
ਪ͠ͱ࢝ΊΔMIR ͯʔͱ͘ (@tetoku_sakana) 2020-02-13 #stapy54
͜Μͳײ͡ͰਐΈ·͢ • ࣗݾհ • MIRͱ • MIRͷ࣮ྫհ • MIRͷ࢝Ίํ
୭ • ͯʔͱ͘ (@tetoku_sakana) • WebΤϯδχΞ • nao_y ͞Μͷ͓༠͍ͰࢀՃͤ͞ ͍ͯͨͩ͘͜ͱʹͳΓ·ͨ͠
None
ਪ͠ࣄ ᶃ • ΦαΧφϝʔλʔ • @osakanameter • ΦαΧφͷMVͷ࠶ੜճ ϑΥϩϫʔͷՄ ࢹԽ௨
• ެࣜϗʔϜϖʔδͷߋ৽ ใχϡʔεͷ৴
ਪ͠ࣄ ᶄ • ΦαΧφΞʔΧΠϒ • ΦαΧφʹ·ͭΘΔ ΠϯλϏϡʔهࣄͳ ͲΛ·ͱΊͨαʔϏ ε
ͦΜͳ͜ΜͳͰ MIRʹೖ͠·ͨ͠ʂ
MIR
None
None
MIR • Music Information Retrieval • ԻָใݕࡧԻָใॲཧͱ༁͞ΕΔ • ݕࡧ͋Μ·Γؔͳ͍ •
ػցֶश×Իָ • (ओʹඇੜܥͷ) Իָؔ࿈ͷ૯শ
MIRͷλεΫ (Ұྫ) • ԻָԻָใ (ௐςϯϙɺίʔυ) ͷݕ ग़ɾਪఆ • Իָͷࣗಈྨ (δϟϯϧงғؾͳͲ)
• ࣖίϐͷࣗಈԽ • ԻָͰԻָΛݕࡧ
MIRͷख๏ • Content-based • ԻָՎࢺͳͲɺָۂσʔλΛѻ͏ • Context-based • ΞʔςΟετͷհจͳͲɺָۂҎ֎ͷपล σʔλΛѻ͏
pythonͱMIR • librosa • madmom • essentia
import librosa >>> filepath = librosa.util.example_audio_file() >>> y, sr =
librosa.load(filepath, offset=30, duration=5) >>> librosa.feature.mfcc(y=y, sr=sr) # MFCCͷऔಘ array([[ -5.229e+02, -4.944e+02, ..., -5.229e+02, -5.229e+02], [ 7.105e-15, 3.787e+01, ..., -7.105e-15, -7.105e-15], ..., [ 1.066e-14, -7.500e+00, ..., 1.421e-14, 1.421e-14], [ 3.109e-14, -5.058e+00, ..., 2.931e-14, 2.931e-14]])
ΦαΧφͷۂ͍͠…
ΦαΧφͷதͰ Ұ൪ָ͍͠ۂʁ
ϚεϩοΫࢦ
None
• Elias Pampalk et al., Proceedings of the ACM Multimedia
2002 • ָۂྨࣅΛࣗݾ৫ԽϚοϓ(SOM)Λͬ ͯՄࢹԽ Content-based Organization and Visualization of Music Archives
Իڹ৺ཧֶΛߟྀͨ͠ɺௌײ্ͷloudnessͷม ԽΛಛྔͱͯ͠நग़͢Δ “Rhythm Patterns”ͱͯ͠ఏҊ͞ΕͯΔಛྔநग़ख๏
None
ϚεϩοΫࢦ͕ ࢉग़Ͱ͖ͦ͏ʂ
ॲཧ֓ཁ 1. STFTΛ͔͚ͯ(ରईͷ) εϖΫτϩάϥϜ Λऔಘ 2. (1) ΛϒϩοΫʹׂ͠(rolling window)ɺͦ ΕͧΕ࣌ؒ࣠ํʹSTFTΛ͔͚ͯέϓετϩ
άϥϜΛऔಘ 3. (2) ʹରͯ͠60ύʔηϯλΠϧΛٻΊΔ
None
None
def minmax(pattern): return (pattern - pattern.min()) / (pattern.max() - pattern.min())
# ࡶ def mathrock_index(pattern): pattern = pattern.sum(axis=0) pattern = minmax(pattern) * 100 pattern = np.diff(pattern) return np.percentile(pattern, q=90) def calc_lfp(filename): cent = CentSpectrum(win_length=2048, hop_length=512) D = librosa.amplitude_to_db(cent.proc(filename)) D_normalized = cent.normalize(D) lfp = LogarithmicFluctuationPattern(hop_length=256) return lfp.proc(D_normalized)
None
MIRͷ࢝Ίํ
MIRͷ࢝Ίํ • MIREXISMIRͷจ • ipynb • musicinformationretrieval.com • ΟʔϯՊେͷnbviewer
MIRͷ࢝Ίํ • SpotifyͷAPIΛ͏ • Audio Features for a Track •
Audio Analysis for a Track
{ "danceability": 0.735, "energy": 0.578, "key": 5, "loudness": -11.84, "mode":
0, "speechiness": 0.0461, "acousticness": 0.514, "instrumentalness": 0.0902, "liveness": 0.159, "valence": 0.624, "tempo": 98.002, "type": "audio_features", "id": "06AKEBrKUckW0KREUWRnvT", "uri": "spotify:track:06AKEBrKUckW0KREUWRnvT", "track_href": “https://api.spotify.com/v1/tracks/…", "analysis_url": “https://api.spotify.com/v1/audio-analysis/…”, "duration_ms": 255349, "time_signature": 4 }
None
·ͱΊ • ใগͳ͍͚ͲMIRͷෑډ͍ • ϥΠϒϥϦlibrosa͕͓͢͢Ί • SpotifyͷAPI͓͢͢Ί • ΦαΧφྑ͍
ਪ͠ۦಈ։ൃ Ұॹʹ࢝ΊͯΈ·͠ΐ͏ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʙ