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
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
300
Lightning近況報告
kozy4324
0
230
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
2
1k
時期が悪い!それでもRaspberry Piを買って遊んで活用するには / 20260627-osc26do-rpi-jikigawarui
akkiesoft
1
890
5分でわかるDuckDB Quack
chanyou0311
4
260
水を運ぶ人としてのリーダーシップ
izumii19
4
1.1k
データレイクの「見えない問題」を可視化する
sansantech
PRO
1
220
Deep Data Security 機能解説
oracle4engineer
PRO
2
230
組織における AI-DLC 実践
askul
0
140
toB プロダクトから見たWAF
tokai235
0
240
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
1
370
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
3
860
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
210k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
Statistics for Hackers
jakevdp
799
230k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
We Are The Robots
honzajavorek
0
260
Optimising Largest Contentful Paint
csswizardry
37
3.7k
WENDY [Excerpt]
tessaabrams
11
38k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
140
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
σϞ