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.9k
Updating an App to Use Swift Concurrency 解説
narujpn
2
400
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
ゴールデンパスは敷いただけでは道にならない ─ 企画部門のエンジニアが技術標準を事業価値に変えるまで
mhrtech
1
260
Amplify Gen2でbackend.tsにCDKを定義する/しない事によるCDKの挙動の違いとユースケース
smt7174
1
490
【公開用】AI_Dev_Ex2026_AI_登壇資料
matsuritechnologies
PRO
1
460
クラウドを使う側から、作る側へ / 大吉祥寺.pm 2026前夜祭
fujiwara3
4
1.1k
なぜ、あなたのAPIは使われないのか? AX時代の設計原則、ガードレール、運用体制
yokawasa
1
210
Webアプリ認証の全体像 / The Big Picture of Web App Authentication
kitano_yuichi
1
410
凡エンジニアがこの先生きのこるためには。〜TypeScript完全に理解したい〜
alchemy1115
2
410
生成 AI 時代にいま一度「問い合わせ」について考えてみる
kazzpapa3
1
130
Devsumi 2026 Summer 人もAIも使える共通基盤を事業の加速装置にする~デザインシステム運用に学ぶ組織レバレッジ~ 渡辺 凌央
legalontechnologies
PRO
1
280
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
300
AI、CDK と協働する Full TypeScript アプリケーション開発 / Full TypeScript Application with AI and CDK
geekplus_tech
2
480
VPCセキュリティ対応の最新事情
nagisa53
1
230
Featured
See All Featured
We Are The Robots
honzajavorek
0
280
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
The untapped power of vector embeddings
frankvandijk
2
1.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Context Engineering - Making Every Token Count
addyosmani
9
1k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
180
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
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
σϞ