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
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
380
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
MCP with Cloudflare Workers
yusukebe
2
220
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
ドメインイベント増えすぎ問題
h0r15h0
2
300
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
220
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Designing for Performance
lara
604
68k
Facilitating Awesome Meetings
lara
50
6.1k
Optimizing for Happiness
mojombo
376
70k
Designing Experiences People Love
moore
138
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Faster Mobile Websites
deanohume
305
30k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Typedesign – Prime Four
hannesfritz
40
2.4k
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ɹ