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
距離関数を極める! / SESSIONS 2024
gam0022
0
290
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Contemporary Test Cases
maaretp
0
140
Jakarta EE meets AI
ivargrimstad
0
210
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
230
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Click-free releases & the making of a CLI app
oheyadam
2
120
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Side Projects
sachag
452
42k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Visualization
eitanlees
145
15k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Faster Mobile Websites
deanohume
305
30k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Raft: Consensus for Rubyists
vanstee
136
6.6k
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ɹ