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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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.4k
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 "xangi" のすすめ
sugupoko
0
270
アカウントが増えてからでは遅い? ~ マルチアカウント統制の勘所 ~
kenichinakamura
0
190
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
2
140
End-to-Endで考える信頼性 —LINEアプリにおけるクライアント開発×SRE連携の実践
maruloop
3
2.8k
ZOZOTOWNの進化と信頼性を両立する負荷試験
zozotech
PRO
0
140
生成AI活用によるODC欠陥分析の分類高速化の実践と導入効果 / 20260703 Suguru Ishii
shift_evolve
PRO
2
100
実装だけじゃない! CCA-F取得エンジニアが教えるClaude Code開発プロセス活用術
diggymo
2
420
Amazon EVS で VCF 9.0 / 9.1 のサポート開始まとめ
mtoyoda
0
280
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
330
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
3.3k
product engineering with qa
nealle
0
150
CSに"SLO"は要らない、経営層に"99.9%"は伝わらない - SREを全社に"翻訳"する3原則
cscengineer
PRO
0
3.3k
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.9k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
280
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
670
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
550
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Git: the NoSQL Database
bkeepers
PRO
432
67k
How to train your dragon (web standard)
notwaldorf
97
6.7k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
300
How to build a perfect <img>
jonoalderson
1
5.8k
How GitHub (no longer) Works
holman
316
150k
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
σϞ