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
メルカリの写真検索を支えるバックエンド CCSE 2019 version
Search
Hirofumi Nakagawa/中河 宏文
July 13, 2019
Programming
0
260
メルカリの写真検索を支えるバックエンド CCSE 2019 version
過去発表分との差分としてEdge関連のデモが追加されています。
デモ動画:
https://youtu.be/UsNMDuZyaJU
Hirofumi Nakagawa/中河 宏文
July 13, 2019
Tweet
Share
More Decks by Hirofumi Nakagawa/中河 宏文
See All by Hirofumi Nakagawa/中河 宏文
IoTデバイスでMLモデルを動かす技術
hnakagawa
0
140
Kanazawa_AI.pdf
hnakagawa
0
160
メルカリ写真検索における Amazon EKS の活用事例と プロダクトにおけるEdgeAI technologyの展望
hnakagawa
5
8.7k
メルカリ写真検索における Amazon EKS の活用事例
hnakagawa
6
29k
メルカリの写真検索を支えるバックエンド
hnakagawa
1
1.1k
Mercari ML Platform
hnakagawa
1
17k
mlct.pdf
hnakagawa
2
2k
機械学習によるマーケット健全化施策を支える技術
hnakagawa
0
220
メルカリのマーケット健全化施策を支えるML基盤
hnakagawa
10
8.9k
Other Decks in Programming
See All in Programming
Outline View in SwiftUI
1024jp
1
330
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
330
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Realtime API 入門
riofujimon
0
150
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
CSC509 Lecture 11
javiergs
PRO
0
180
Featured
See All Featured
Bash Introduction
62gerente
608
210k
How to Ace a Technical Interview
jacobian
276
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Visualization
eitanlees
145
15k
Faster Mobile Websites
deanohume
305
30k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
A Philosophy of Restraint
colly
203
16k
Thoughts on Productivity
jonyablonski
67
4.3k
Statistics for Hackers
jakevdp
796
220k
Building Adaptive Systems
keathley
38
2.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Teambox: Starting and Learning
jrom
133
8.8k
Transcript
Confidential - Do Not Share 1 ϝϧΧϦͷࣸਅݕࡧΛࢧ͑ΔόοΫΤϯυ גࣜձࣾϝϧΧϦ தՏ จ
Confidential - Do Not Share 2 • 20177݄ೖࣾ • ॴଐSRE→AI/MLνʔϜ
• σόΠευϥΠό։ൃ͔ΒϑϩϯτΤ ϯυ։ൃ·ͰΔԿͰ Twitter: hnakagawa14 GitHub: hnakagawa தՏ จ (Hirofumi Nakagawa) ࣗݾհ 2
Confidential - Do Not Share 3 Introduction
Confidential - Do Not Share 4 What is ࣸਅݕࡧ •
ࣸਅݕࡧͱɺ͍ΘΏΔը૾ ݕࡧػೳ • ΞϓϦ͔ΒࣸਅΛݩʹΛ ݕࡧ͢Δ • ໊ΛΒͳͯ͘ը૾͔ ΒΛݕࡧͰ͖Δ ಈըϦϯΫ: https://youtu.be/kTni8EvOCgI
Confidential - Do Not Share 5 جຊతͳࣸਅݕࡧͷΈ Deep Neural Networks
(DNN)Λ༻ͯ͠ը૾ ͔ΒಛϕΫτϧΛऔಘ औಘͨ͠ಛϕΫτϧΛ Approximate Nearest Neighbor Index(ANN Index) ʹՃͯ͠ը૾indexΛߏங ݕࡧ࣌ʹಉ͘͡ը૾͔Β DNNΛհͯ͠ಛϕΫτϧΛऔ ಘ͠ɺANN Index͔Βݕࡧ 2 3 1
Confidential - Do Not Share 6 What is Kubernetes •
KubernetesʢҎԼk8sʣͱ Φʔϓϯιʔεͷίϯςφɾ ΦʔέετϨʔγϣϯγες Ϝ • k8sʹCustom Resource DefinitionͱݺΕΔಠࣗͷ ϦιʔεΛఆٛͰ͖Δػೳ͕ ͋Γɺ։ൃऀͦͷػೳΛհ ͯ͠k8sͷػೳΛ֦ுͰ͖Δ
Confidential - Do Not Share 7 ML Platform Lykeion •
Training/Serving CRD & ΧελϜ ίϯτϩʔϥ • ίϯςφϕʔεɾύΠϓϥϯ • Training/Serving ίϯςφΠϝʔ δɾϏϧμʔ • ϞσϧɾϨϙδτϦ ࣸਅݕࡧLykeionͱݺΕΔͷ ML Platform্ʹߏங͞Ε͓ͯΓɺԼ هͷػೳPlatformଆͷػೳΛ༻͠ ͍ͯΔ
Confidential - Do Not Share 8 Architectureɹ
Confidential - Do Not Share 9 Architecture֓ཁਤ
Confidential - Do Not Share 10 1.TrainingɾϦιʔεͷ࡞
Confidential - Do Not Share 11 TrainingɾϦιʔεͷ࡞ • Training custom
resourceΛ CronJob͕࡞ • ΧελϜɾίϯτϩʔϥ͕ CRDɾϦιʔεͰઃఆ͞Εͨ ίϯςφϕʔεɾύΠϓϥΠ ϯΛ࣮ߦ • ࣮ߦ͢Δόον୯Ґͱͯ͠ Hourly, Daily, Monthly͕ଘࡏ
Confidential - Do Not Share 12 • ֤ఔΛݸผͷίϯςφɾΠϝʔδͰ࣮ߦ • ϥΠϒϥϦͷґଘؔͳͲڥφΠʔϒͳMLύΠϓϥΠϯͷΛղܾ
• ύΠϓϥΠϯDAGYAMLͰهड़ ֤ఔͷೖग़ྗPersistent VolumeʢҎ ԼPVʣΛհ͢ ίϯςφϕʔεɾύΠϓϥΠϯ
Confidential - Do Not Share 13 TrainingɾϦιʔεͷ࡞ • શͯͷόον࣮ߦใ͕ CRDɾϦιʔεͱͯ͠k8s্ʹ
Δ • ಉ͡ॲཧΛ࠶࣮ߦग़དྷΔͨ Ίɺόονͷ࠶࣮ߦΛ͏ো ෮چ࡞ۀ͕༰қ
Confidential - Do Not Share 14 2.ը૾ͷμϯϩʔυ
Confidential - Do Not Share 15 • S3্ʹଘࡏ͢ΔϝϧΧϦɾΠϝʔδετΞ͔Βը૾Λμϯϩʔυ • ύΠϓϥΠϯ্ͬͱ͕͔͔࣌ؒΔఔʢը૾͕େͳͨΊ)
• ͦͷͨΊPVʹҰఆظؒΩϟογϡ͢ΔࣄʹΑͬͯ࠶ΠϯσοΫε͕ඞཁ ͳ࣌ʹૉૣ͘ύΠϓϥΠϯΛճͤΔΑ͏ʹ͍ͯ͠Δ ը૾ͷμϯϩʔυ
Confidential - Do Not Share 16 3. ΞηοτͷΞοϓϩʔυ
Confidential - Do Not Share 17 • ύΠϓϥΠϯͷՌͰ͋ΔಛϕΫτϧͱANN IndexΛϞσϧɾϨϙδτ Ϧʹอଘ
• શͯͷՌόʔδϣϯཧ͞Εͨঢ়ଶͰอଘ͞ΕΔ • ϞσϧɾϨϙδτϦGCS্ʹߏங ΞηοτͷΞοϓϩʔυ
Confidential - Do Not Share 18 4.ServingΠϝʔδͷϏϧυ
Confidential - Do Not Share 19 1. ϞσϧɾϨϙδτϦΛImage BuilderͱݺΕΔdaemon͕ࢹ 2.
৽͍͠Serving͖͢Ϧιʔε͕Ճ͞ΕΔͱࣗಈͰServingίϯςφɾΠϝ ʔδΛϏϧυ 3. ίϯςφɾΠϝʔδશͯͷANN IndexͷαʔϏϯάʹඞཁͳϦιʔεΛ શؚͯΜͰ͍Δ 4. Ϗϧυ͞ΕͨίϯςφɾΠϝʔδΛίϯςφɾϨδετϦʹϓογϡ ServingΠϝʔδͷϏϧυ
Confidential - Do Not Share 20 5.ServingϦιʔεͷ࡞
Confidential - Do Not Share 21 ServingɾϦιʔεͷ࡞ • Image BuilderίϯςφɾΠϝʔ
δΛϏϧυͨ͋͠ͱɺServingΧε λϜɾϦιʔεΛ࡞ • ServingΧελϜɾίϯτϩʔϥ CRDɾϦιʔεͷઃఆΛݩʹඞཁ ͳDeploymentɺServiceΛ࡞ • ຊγεςϜͰߏங͞ΕͨANN IndexΛݸผͷIndexαʔϏεͱ͠ ͯσϓϩΠ
Confidential - Do Not Share 22 6.ServiceσΟεΧόϦ
Confidential - Do Not Share 23 αʔϏεɾσΟεΧόϦ • Ϋϥελ্ʹଘࡏ͢ΔIndexαʔϏ εΛk8sΛհͯࣗ͠ಈతʹऔಘ͢
Δ • ͳΔ͘େ͖ͳཻͷIndexΛ ༻͢ΔΑ͏ɺҟͳΔظؒɾཻͷ IndexαʔϏε(Hourly, Daily, Monthly) ΛࣗಈతʹΈ߹ΘͤΔ • REST <-> IndexαʔϏεؒͷϓϩ τίϧgRPCΛ༻
Confidential - Do Not Share 24 7.֓ཁਤৼΓฦΓ
Confidential - Do Not Share 25 Conclusionɹ
Confidential - Do Not Share 26 1. ίϯςφɾϕʔεͷ࠶ݱੑͷߴ͍γεςϜ 2. k8sͷCRD/ΧελϜɾίϯτϩʔϥαʔϏεɾσΟεΧόϦͷػೳΛ׆༻
3. Batch Execution as Custom ResourceɺML PlatformͰ࣮ݱ͞Ε͍ͯΔػ ೳΛ༻͠ɺϩόετͳγεςϜΛߏங 4. ΫϥυɾΠϯϑϥΛk8sͰநԽ͢ΔࣄʹΑͬͯɺ֤Ϋϥυɾϕϯμͷྑ ͍ͱ͜औΓΛ͍ͯ͠Δ ࣸਅݕࡧͷόοΫΤϯυɾΠϯϑϥ
Confidential - Do Not Share 27 Next Futureɹ
Confidential - Do Not Share 28 Realtime image search •
EdgeଆͰobject detection & feature extractionΛߦ͏ • feature vectorΛΫΤϦʹANN Index service͔ΒྨࣅΛऔಘ • Graph RuntimeTF Lite + custom operatorΛ༻
Confidential - Do Not Share 29 Realtime image search demo
• ݕࡧʹඞཁͳਪॲཧͷେ෦ΛEdgeଆͰߦ ͍ͬͯΔ • ϦΞϧλΠϜͳΠϯλϥΫγϣϯΛ࣮ݱ • UX্େ͖ͳϝϦοτ͕༗Δ
Confidential - Do Not Share 30 Thank you all for
coming todayɹ