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
780
推しと始めるMIR
アイドルのファンになったことをきっかけに機械学習の分野の一つであるMIR(音楽情報検索)に入門したので、MIRについて紹介しつつ作ったものの話とかをゆるふわにしようと思います!
てーとく
February 13, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
21
4k
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
12
4.4k
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
170
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.5k
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
470
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
120
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
160
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
170
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
820
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
86
29k
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
870
Featured
See All Featured
The Invisible Side of Design
smashingmag
301
51k
Done Done
chrislema
184
16k
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
Designing for Performance
lara
610
69k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Faster Mobile Websites
deanohume
307
31k
A Tale of Four Properties
chriscoyier
160
23k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Code Review Best Practice
trishagee
69
18k
Producing Creativity
orderedlist
PRO
346
40k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
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͓͢͢Ί • ΦαΧφྑ͍
ਪ͠ۦಈ։ൃ Ұॹʹ࢝ΊͯΈ·͠ΐ͏ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʙ