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
270
メルカリの写真検索を支えるバックエンド 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
Recoilを剥がしている話
kirik
5
6.6k
快速入門可觀測性
blueswen
0
340
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
testcontainers のススメ
sgash708
1
120
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
310
useSyncExternalStoreを使いまくる
ssssota
6
1k
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
710
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
460
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
良いユニットテストを書こう
mototakatsu
5
2k
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
700
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Making Projects Easy
brettharned
116
5.9k
Code Reviewing Like a Champion
maltzj
520
39k
A designer walks into a library…
pauljervisheath
204
24k
Git: the NoSQL Database
bkeepers
PRO
427
64k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Facilitating Awesome Meetings
lara
50
6.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
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ɹ