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
CoreML3のオンデバイストレーニングでつくる母音推定
Search
naru-jpn
January 25, 2020
Technology
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CoreML3のオンデバイストレーニングでつくる母音推定
naru-jpn
January 25, 2020
More Decks by naru-jpn
See All by naru-jpn
配信アプリのためのリアルタイムプッシュ通知ぼかしの夢
narujpn
3
1.1k
PiPを応用した配信コメントバー機能の開発秘話と技術の詳解 / pip_streaming_comment_bar
narujpn
3
4.8k
Updating an App to Use Swift Concurrency 解説
narujpn
2
390
PiP で実現するミラティブの配信コメントバー / pip-streaming-comment-bar
narujpn
0
1.3k
App Extension のスタックトレース情報からクラッシュを解析/集計する / Analyzing app extension's stack trace
narujpn
3
1.8k
ミラティブとWebRTC - WebRTC framework の中身を覗いてみよう / WebRTC framework AudioUnit Processing
narujpn
1
2.3k
AltConfと周辺の歩き方
narujpn
0
2.1k
エンジニア経験を活かしたスクラムマスターとして 開発チームとプロダクトを成長させる
narujpn
1
440
GASで作るファネル分析ツール
narujpn
1
210
Other Decks in Technology
See All in Technology
從開發到部署全都交給 AI:實作 AI 驅動的自動化流程
appleboy
0
180
#エンジニアBooks 30分でわかる 「技術記事を書く技術」 / engineer-books 2026-06-30
jnchito
1
130
4人目のSREはAgent
tanimuyk
0
270
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
150
Lightning近況報告
kozy4324
0
230
Deep Data Security 機能解説
oracle4engineer
PRO
2
230
AIをフル活用してオンコール機能のプロトタイプを2日で作った話 / Building an AI-Powered On-Call Prototype in Just Two Days
nari_ex
0
140
Microsoft のサポートとフィードバック総まとめ
murachiakira
PRO
0
110
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
550
Multi-Agent並列開発を 安全に回すための技術 / Technology for Safely Multi-Agent Parallel Development
tooppoo
0
210
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
1
370
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
350
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
450
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
210
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
How STYLIGHT went responsive
nonsquared
100
6.2k
Chasing Engaging Ingredients in Design
codingconduct
0
230
Site-Speed That Sticks
csswizardry
13
1.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.6k
Navigating Team Friction
lara
192
16k
Transcript
CoreML3ͷΦϯσόΠετϨʔχϯάͰͭ͘ΔԻਪఆ Inference of vowel by on-device training of CoreML3 Naruki
Chigira @ Mirrativ, inc. _naru_jpn
σϞͰ͏ΞϓϦͷίʔυ https://github.com/naru-jpn/InferenceVowel
Իਪఆ /a/, /i/, /u/, /e/, /o/ ͷਪఆ
ΦϯσόΠετϨʔχϯά https://developer.apple.com/jp/machine-learning/core-ml/ …ϢʔβʔσʔλΛ༻ͨ͠ϞσϧͷΞοϓσʔτΛΦϯσό ΠεͰ࣮ߦͰ͖ΔΑ͏ʹͳͬͨͨΊɺϓϥΠόγʔΛ৵͢Δ ͜ͱͳ͘ɺϢʔβʔͷߦಈʹ߹ΘͤͯϞσϧΛΞοϓσʔτ͠ ͍ͯ͘͜ͱ͕Ͱ͖·͢ɻ
None
ํ
લॲཧ Preprocessing ֶश / ਪ Training / Inference Իσʔλ Audio
લॲཧ Preprocessing ֶश / ਪ Training / Inference Իσʔλ Audio
let captureSession = AVCaptureSession() … captureSession.startSession()
લॲཧ Preprocessing ֶश / ਪ Training / Inference Իσʔλ Audio
ϑʔϦΤม Fourier Transformation ϝϧϑΟϧλόϯΫ Mel Filter Bank ࢄίαΠϯม Discrete Cosine Transformation
ϑʔϦΤม Fourier Transformation (ϩά)ϝϧϑΟϧλόϯΫ (Log) Mel Filter Bank ࢄίαΠϯม Discrete
Cosine Transformation Import Accelerate // ԻΛप͝ͱʹղ vDSP_fft_zrip(fftsetup, … // ਓ͕ฉ͖͚͍͢ԻΛΑΓৄࡉʹ vDSP_mmul(melFilerBank, … // ΑΓগͳ͍σʔλͰදݱ vDSP_DCT_Execute(dctsetup, …
ϑʔϦΤม Fourier Transformation (ϩά)ϝϧϑΟϧλόϯΫ (Log) Mel Filter Bank ࢄίαΠϯม Discrete
Cosine Transformation Import Accelerate // ԻΛप͝ͱʹղ vDSP_fft_zrip(fftsetup, … // ਓ͕ฉ͖͚͍͢ԻΛΑΓৄࡉʹ vDSP_mmul(melFilerBank, … // ΑΓগͳ͍σʔλͰදݱ vDSP_DCT_Execute(dctsetup, … 1024ݸͷσʔλ 16ݸͷσʔλ ~25μs
લॲཧ Preprocessing ֶश / ਪ Training / Inference Իσʔλ Audio
https://github.com/apple/coremltools/blob/master/examples/updatable_models/updatable_nearest_neighbor_classifier.ipynb apple/coremltools updatable_nearest_neighbor_classifier.ipynb Jupyter notebook ্Ͱkۙ๏Λར༻ͯ͠ ྨΛ͢ΔϞσϧΛ࡞͢Δαϯϓϧ
લॲཧ Preprocessing ֶश / ਪ Training / Inference Իσʔλ Audio
https://github.com/apple/coremltools/blob/master/examples/updatable_models/updatable_nearest_neighbor_classifier.ipynb // ֶशʹ͏σʔλͷ४උ let inputValue = snapshot.featureValue let outputValue = MLFeatureValue( string: snapshot.vowel.identifier ) let dataPointFeatures: [String: MLFeatureValue] = [ "input": inputValue, "label": outputValue ] let provider = try! MLDictionaryFeatureProvider( dictionary: dataPointFeatures )
લॲཧ Preprocessing ֶश / ਪ Training / Inference Իσʔλ Audio
https://github.com/apple/coremltools/blob/master/examples/updatable_models/updatable_nearest_neighbor_classifier.ipynb // ֶशͷ࣮ߦ let batchProvider = MLArrayBatchProvider( array: featureProviders ) let updateTask = try! MLUpdateTask( forModelAt: UpdatableKNN.urlOfModelInThisBundle, trainingData: batchProvider, configuration: nil, completionHandler: completion ) updateTask.resume()
લॲཧ Preprocessing ֶश / ਪ Training / Inference Իσʔλ Audio
https://github.com/apple/coremltools/blob/master/examples/updatable_models/updatable_nearest_neighbor_classifier.ipynb // ਪͷ࣮ߦ let inputs = snapshots.compactMap({ $0.featureValue.multiArrayValue }).map({ UpdatableKNNInput(input: $0) }) let model = try! UpdatableKNN(contentsOf: updatedModelUrl) // Ի͝ͱͷ͕֬ग़ྗͱͯ͠ฦͬͯ͘Δ let outputs = try model.predictions(inputs: inputs) 100~200μs
σϞ