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
250
メルカリの写真検索を支えるバックエンド 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
150
メルカリ写真検索における Amazon EKS の活用事例と プロダクトにおけるEdgeAI technologyの展望
hnakagawa
5
8.6k
メルカリ写真検索における Amazon EKS の活用事例
hnakagawa
6
29k
メルカリの写真検索を支えるバックエンド
hnakagawa
1
1.1k
Mercari ML Platform
hnakagawa
1
17k
mlct.pdf
hnakagawa
2
1.9k
機械学習によるマーケット健全化施策を支える技術
hnakagawa
0
210
メルカリのマーケット健全化施策を支えるML基盤
hnakagawa
10
8.8k
Other Decks in Programming
See All in Programming
実践Dash - 手を抜きながら本気で作るデータApplicationの基本と応用 / Dash for Python and Baseball
shinyorke
2
200
XP2024 っていう国際会議に行ってきたよの記 / XP2024 Conference Report
bonotake
4
110
CDKを活用した 大規模コンテナ移行 プロジェクトの紹介
yoyoyopg
0
220
LLMと音声基盤モデルを用いた音声認識
spiralai
PRO
0
140
tsconfig.jsonの最近の新機能 ファイルパス編
uhyo
5
940
DjangoNinjaで高速なAPI開発を実現する
masaya00
0
400
Modernisation Progressive d’Applications PHP
hhamon
0
160
クラウドサービスの 利用コストを削減する技術 - 円安の真南風を感じて -
pyama86
3
230
Flutterアプリを生成AIで生成する勘所
rizumita
0
230
DroidKaigi 2024 - You will 💜 Becoming a fullstack developer with your Android skills
brah
0
110
ROS 2のZenoh対応とZenohのROS 2対応
takasehideki
2
220
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
4
93k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
Optimizing for Happiness
mojombo
375
69k
Building a Scalable Design System with Sketch
lauravandoore
458
32k
The Brand Is Dead. Long Live the Brand.
mthomps
53
38k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Creatively Recalculating Your Daily Design Routine
revolveconf
216
12k
How to Think Like a Performance Engineer
csswizardry
16
1k
The Illustrated Children's Guide to Kubernetes
chrisshort
47
48k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
Being A Developer After 40
akosma
84
590k
What's in a price? How to price your products and services
michaelherold
243
11k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
21k
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ɹ