Slide 1

Slide 1 text

- ػցֶशͱۙࣅۙ๣୳ࡧ - ࡾ୐༔հ / Pepabo R&D Institute, GMO Pepabo, Inc. 2018.09.11 ϖύϘݚڀॴ in da house #1 ྨࣅը૾ݕࡧͷཪଆ

Slide 2

Slide 2 text

ϓϦϯγύϧΤϯδχΞ ࡾ୐༔հ!NPOPDISPNFHBOF (.0ϖύϘגࣜձࣾϖύϘݚڀॴ IUUQCMPHNPOPDISPNFHBOFDPN

Slide 3

Slide 3 text

1. ͳͥྨࣅը૾ݕࡧ͔ 2. ྨࣅը૾ݕࡧΛࢧ͑Δٕज़ 3. ྨࣅը૾ݕࡧͷಋೖ 4. ྨࣅը૾ݕࡧͷ͜Ε͔Β 3 ໨࣍

Slide 4

Slide 4 text

1. ͳͥྨࣅը૾ݕࡧ͔

Slide 5

Slide 5 text

• ৘ใ୳ࡧϓϩηε͸γεςϜଆͷ ٕज़ৄࡉ͚ͩͰ͸ͳ͘ɺ͜ͷϓϩ ηεΛۦಈ͢ΔओମͰ͋Δར༻ऀ ͕ଘࡏ͢Δ • ར༻ऀαΠυΛத৺ͱͨ͠৘ใ୳ ࡧϓϩηεϞσϧͷઌߦݚڀʹΑ Γɺ৘ใཁٻ͸ɺ༷ʑͳจ຺ʹΑ ΓมԽ͍ͯ͘͜͠ͱ͕Θ͔͍ͬͯ Δ 5 ͳΊΒ͔ͳϚονϯάʹ޲͚ͯ ৘ใཁٻΛऔΓרٕ͘ज़ͱϓϩηεϞσϧؔ࿈ਤ จ຺ʹΑΓ࠷దͳԠ౴͕มԽ͢ΔͷͰ͋Ε͹ɺ ٕज़ؒͰͷ༏ҐੑධՁͰ͸ͳ͘ɺ ঢ়گʹԠͨ͡બ୒͕ྑ͍ͷͰ͸ͳ͍͔

Slide 6

Slide 6 text

• ར༻ऀͷऔΓ͏Δߦಈ͕จ຺ʹΑΓมԽ͢ΔͱԾఆ্ͨ͠Ͱɺਫ਼៛ͳจ຺ͷ೺ Ѳฒͼʹ՝୊ઃఆͷ໌֬ԽࢧԉΛ௨ͯ͠ɺ௚ײతͳ໰͍߹ΘͤʹԠ౴Ͱ͖Δ࢓ ૊Έ 6 ͳΊΒ͔ͳϚονϯάʹ޲͚ͯ 1. จ຺ʹΑΓԠ౴ͷධՁ͕มΘΔ͜ͱͷ֬ೝ 2. ར༻ऀͷจ຺ͷύλʔϯ෼ྨͱࣝผख๏ͷཱ֬ 3. ඞཁʹԠͯ͡௚ײతͳ໰͍߹ΘͤʹԠ౴Ͱ͖Δݕࡧ৘ใٕज़ͷಋೖ 4. ՝୊ઃఆͷ໌֬Խࢧԉͷݕ౼

Slide 7

Slide 7 text

2. ྨࣅը૾ݕࡧΛࢧ͑Δٕज़

Slide 8

Slide 8 text

• ಛ௃ྔม׵ • ݸʑͷը૾σʔλͷྨࣅੑΛఆྔతʹൺֱՄೳͳܗࣜʹม׵͢Δ • ۙ๣୳ࡧ • ม׵ͯ͠ಘΒΕͨಛ௃ྔͲ͏͠Λൺֱ͠ɼྨࣅ͢Δू߹Λಛఆ͢Δ 8 ྨࣅը૾ݕࡧΛࢧ͑Δٕज़

Slide 9

Slide 9 text

ಛ௃ྔม׵

Slide 10

Slide 10 text

• m࣍ݩͷϕΫτϧxΛn࣍ݩͷϕΫτϧy΁ࣸ૾͢Δؔ਺fΛਪఆ͢Δֶशख๏ 10 χϡʔϥϧωοτϫʔΫ: Ϟσϧ x1 x2 xm b W y1 y2 yn 1 2 o1 = σ( m ∑ i=0 w1i xi + b1 ) h 3 o = σ(Wx + b) w11 w12 . . w1m w21 w22 . . w2m . . wh1 wh2 . . whm x1 x2 . . xm + b1 b2 . . bh x f y h wh1 wh2 x1 x2 ೖྗ͝ͱʹॏΈXΛ৐ࢉόΠΞε ͨ͠΋ͷΛ׆ੑԽؔ਺ʹ௨͢ શϊʔυʹର͢Δॲཧ͸ߦྻͱͯ͠ૢ࡞Ͱ͖Δ

Slide 11

Slide 11 text

11 χϡʔϥϧωοτϫʔΫ: ֶश x1 x2 xm y1 y2 yn x f y • m࣍ݩͷϕΫτϧxΛn࣍ݩͷϕΫτϧy΁ࣸ૾͢Δؔ਺fΛਪఆ͢Δֶशख๏ t tn t2 t1 W(1) W(2) b(1) b(2) ✓(i+1) = ✓(i) ↵rEk E = 1 2 X n (yn tn)2 E = X n tn ln yn rEk = ( @Ek @✓1 , .. @Ek @✓V ) ग़ྗͱਖ਼ղͷޡࠩΛද͢ଛࣦؔ਺Λఆٛ͢Δɻ ೋ৐࿨ޡࠩʢࠨʣɺަࠩΤϯτϩϐʔޡࠩʢӈʣ ଛࣦؔ਺ʹର͢Δ֤ύϥϝλͷภඍ෼ͷ஋ͷू·Γʢޯ഑ʣΛ༻ ͍ͯଛࣦؔ਺ͷ஋͕খ͘͞ͳΔΑ͏ʹύϥϝλΛߋ৽͢Δ͜ͱΛ ޯ഑߱Լ๏ͱݺͿɻಛʹҰ෦ͷ݁ՌͷΈΛར༻͢Δ֬཰తޯ഑߱ Լ๏͕Α͘༻͍ΒΕΔɻ Αͬͯޯ഑͕ফ͑ͳ͍Α͏ͳͳΊΒ͔ͳ׆ੑԽؔ਺͕޷·ΕΔɻ ·ͨɺ֤ύϥϝλͷภඍ෼ΛݸผʹٻΊΔͷͰ͸ͳ͘ɺχϡʔϥ ϧωοτϫʔΫΛදؔ͢਺GΛ߹੒ؔ਺ͱݟཱͯΔ͜ͱͰɺ্ྲྀ ͷޡࠩͱࣗ਎ͷೖྗ஋ͷΈΛ࢖ͬͯܭࢉྔΛ཈͑ͳ͕Βޮ཰తʹ ޯ഑ΛٻΊΔख๏Λޡࠩٯ఻೻๏ͱݺͿɻ

Slide 12

Slide 12 text

χϡʔϥϧωοτϫʔΫ: ֶश 12 • ࢀߟ (PʹΑΔޯ഑߱Լ๏ཧ࿦ͱ࣮ફ IUUQTTQFBLFSEFDLDPNNPOPDISPNFHBOFHSBEJFOUEFTDFOUJOHPMBOH θϩ͔Β࡞Δ%FFQ-FBSOJOH

Slide 13

Slide 13 text

৞ΈࠐΈχϡʔϥϧωοτϫʔΫ 13 ੵ࿨ԋࢉ ৞ΈࠐΈ ࠷େ஋ ೖྗσʔλʹରͯ͠ੵ࿨ԋࢉΛߦ͏ϑΟϧλΛద༻͠ɺ ಛ௃Ϛοϓͱͯ͠ग़ྗ͢Δɻۭؒ৘ใΛߟྀͰ͖Δɻ ࠷దͳϑΟϧλͷॏΈ͸ֶशʹΑͬͯ֫ಘ͢Δɻ • ۭؒత৘ใΛߟྀͨ͠χϡʔϥϧωοτϫʔΫ ϓʔϦϯά ೖྗσʔλʹରۭͯؒ͠ͷू໿Λߦ͏ϑΟϧλΛద༻ ͢Δɻ࠷େ஋΍ฏۉ஋Λར༻͢ΔͷͰֶश͕ෆཁɻ ࡉ͔ͳҐஔมԽʹର͢Δؤڧੑʹߩݙ͢Δɻ ಛ௃நग़ث ࣝผث

Slide 14

Slide 14 text

14

Slide 15

Slide 15 text

ۙ๣୳ࡧ

Slide 16

Slide 16 text

ߴ࣍ݩϕΫτϧͷۙ๣୳ࡧ wҰൠʹը૾ͷಛ௃ྔ͸ߴ࣍ݩͷϕΫτϧͱͯ͠දݱ͞ΕΔ wߴ࣍ݩͷϕΫτϧू߹͔ΒΫΤϦͱͳΔϕΫτϧͱڑ཭ͷ͍ۙز͔ͭͷ ϕΫτϧΛऔΓग़͢͜ͱΛۙ๣୳ࡧͱݺͿ wର৅ͷಛ௃ྔϕΫτϧ͕େྔʹ͋Δ৔߹ɺϕΫτϧؒͷڑ཭Λ౎౓શ݅ ʹରͯ͠ܭࢉ͍ͯͯ͠͸͕͔͔࣌ؒΔͨΊɺπϦʔ΍ϋογϡΛࣄલʹ ߏங͢Δ͜ͱͰݕࡧͷߴ଎ԽΛਤΔ

Slide 17

Slide 17 text

ۙࣅۙ๣୳ࡧ wΫΤϦʹ͍ۙάϧʔϓʹਅͷ࠷ۙ๣఺ؚ͕·ΕΔ޻෉͸ܭࢉ࣌ؒΛ૿Ճ ͤ͞ɺ࣍ݩ਺͕ଟ͍৔߹͸ɺશ୳ࡧͱมΘΒͳ͘ͳΔ৔߹΋͋Δ w্هͷ੍໿Λ؇Ίͨ΋ͷ͕ۙࣅ࠷ۙ๣୳ࡧ wਫ਼౓ͱ଎౓ͷόϥϯεΛݟͯ࠾༻͢Δඞཁ͕͋Δ w໦ߏ଄Λ༻͍Δ"//ɺ3BOEPNJ[FELEUSFFɺ'-"//ͳͲ wϋογϡߏ଄Λ༻͍Δ-4)ͳͲ

Slide 18

Slide 18 text

4QPUJGZBOOPZ w "QQSPYJNBUF/FBSFTU /FJHICPST0I:FBI w $ϥΠϒϥϦͱ1ZUIPO౳ͷό ΠϯσΟϯάΛఏڙ w ϥϯμϜαϯϓϦϯάͨ͠ೋ఺Λ ݩʹۭؒΛೋ෼ׂΛ܁Γฦͯ͠໦ ߏ଄Λෳ਺ߏங w ୳ࡧ࣌͸෼ׂϕΫτϧͰৼΓ෼͚

Slide 19

Slide 19 text

3. ྨࣅը૾ݕࡧͷಋೖ

Slide 20

Slide 20 text

• ಛ௃ྔม׵ • ݸʑͷը૾σʔλͷྨࣅੑΛఆྔతʹൺֱՄೳͳܗࣜʹม׵͢Δ
 ‎ ఆੑతͳධՁʹ͍ۙ͠ಛ௃ྔม׵ػߏͱͯ͠ͷDeep CNN
 ➕ ֶशͱ༧ଌΛॲཧ͢ΔͨΊͷ֦ுੑͱαʔϏε͔Βͷಠཱੑ • ۙ๣୳ࡧ • ม׵ͯ͠ಘΒΕͨಛ௃ྔͲ͏͠Λൺֱ͠ɼྨࣅ͢Δू߹Λಛఆ͢Δ
 ‎ ਫ਼౓ͱ଎౓Λཱ྆͢ΔANN(ۙࣅۙ๣୳ࡧ)
 ➕ σʔλͷू໿ͱαʔϏε͔Βͷಠཱੑ 20 ྨࣅը૾ݕࡧΛࢧ͑Δٕज़

Slide 21

Slide 21 text

Similar images search system using ANN 21 Feature Similar items ANN [2048]float64 query response Deep CNN index Features [n][2048]float64 Deep CNN register find similar features

Slide 22

Slide 22 text

• ϩά΍DBͳͲͷαʔϏεࢿ࢈ͱ࿈ܞͰ͖Δ
 ‎ ೖग़ྗ͕Cloud Storageܦ༝ • ൺֱత༰қʹϞσϧͷߏஙͱࢼߦ͕ߦ͑Δ
 ‎ TensorFlowΛ࠾༻ • ֶश݁ՌΛར༻͢ΔͨΊͷखஈͱͯ͠APIΛఏڙ͢Δ
 ‎ ΦϯϥΠϯ༧ଌαʔϏεʹΑΓϞσϧͷAPIԽ • ্هͷ࢓૊Έ͕εέʔϥϒϧͰ͋Δ͜ͱ
 ‎ ෼ࢄܕτϨʔχϯάΠϯϑϥͱෛՙ෼ࢄαʔϏεͷ࿈ܞ 22 ػցֶशج൫ͱͯ͠ͷGoogle Cloud ML

Slide 23

Slide 23 text

ಛ௃ྔม׵ w͋Δ࣌఺·Ͱͷ࡞඼ը૾ҰཡΛಛ௃ྔʹม׵͢Δ wม׵ͨ͠ಛ௃ྔҰཡΛۙࣅۙ๣୳ࡧσʔλϕʔεʹ౤ೖ͢Δ Service Object Storage GCP image to data data to feature vectorizer by Deep CNN ANN Workers

Slide 24

Slide 24 text

5FOTPS'MPXʹΑΔ ಛ௃ྔม׵ͷ࣮૷ ֶशࡁΈωοτϫʔΫͷಡΈࠐΈ தؒ૚Λग़ྗ૚ͱͯ͠ಛ௃நग़ثͱ͢Δ ը૾Λೖྗͱͯ͠ಛ௃ྔʹม׵

Slide 25

Slide 25 text

• ۙࣅۙ๣୳ࡧΛαʔϏεʹಋೖ͢Δʹ͋ͨΓɺσʔλͷҰݩԽͱෳ਺ͷΞϓϦ έʔγϣϯαʔό͔ΒͷϦΫΤετΛॲཧͰ͖ΔΑ͏ʹHTTPϕʔεͷAPIαʔ ό͕ඞཁ • mruby-annoy on ngx_mrubyͱͯ͠ఏڙ 25 monochromegane/mruby-annoy + ngx_mruby

Slide 26

Slide 26 text

mruby_annoy on ngx_mruby 26 class NNS def call(env) params = env['QUERY_STRING'].split('&') .map {|kv| kv.split('=') }.to_h category_id = params['category_id'].to_i product_id = params['product_id'].to_i limit = (params['limit'] || 10).to_i userdata = Userdata.new "annoy_data_key" annoy = userdata.send("category_#{category_id}") return not_found unless annoy nns = annoy.get_nns_by_item(product_id, limit) [200, content_type, [nns.to_json]] end private def not_found return [404, content_type, [{'error' => 'not_found'}.to_json]] end def content_type {'Content-Type' => 'application/json;charset=utf-8'} end end run NNS.new

Slide 27

Slide 27 text

• ECαΠτʹ͓͍ͯ঎඼ͷ௥Ճߋ৽͸සൟʹൃੜ͢ΔͨΊஞ࣍·ͨ͸ࠩ෼Ͱͷ ΠϯσοΫεߋ৽͕༗༻ • ΠϯσοΫε಺෦IDͱαʔϏεଆͷIDͱͷϚοϐϯά • ͜ΕΒΛຬͨ͠ɼ͔ͭɼΑΓߴ଎ͳۙࣅۙ๣୳ࡧAPIαʔόʔΛgannoyͱͯ͠ ఏڙ • ݱ࣌఺͸ओʹஞ࣍ߋ৽࣌ͷੑೳ໰୊ͷͨΊόοΫΤϯυΛyahoo/NGTʹࠩ ͠ସ͑ͯӡ༻த 27 monochromegane/gannoy(-yahoo/NGT)

Slide 28

Slide 28 text

28 monochromegane/gannoy(-yahoo/NGT) # Add item $ curl \ ’http://localhost:1323/databases/hoge/features/100’ \ -H "Content-type: application/json” \ -X PUT \ -d '{"features": [1.0, 0.5, 0.2,..]}’ # Search $ curl \ ’http://localhost:1323/search?database=hoge&id=100’

Slide 29

Slide 29 text

ྨࣅը૾ݕࡧ 29 Nyah products#show product_id nearest products products#update Gannoy Object Storage GCP data to feature vectorizer by Inception-V3 ˞ۙࣅۙ๣୳ࡧ࣌ʹେ෦෼ͷ ΠϯσοΫε΁ͷΞΫηε͕ ൃੜ͢ΔͨΊ࣮༻తͳ଎౓Λ ಘΔͨΊʹ͸σʔλϕʔεϑΝ Πϧ͕શͯϖʔδΩϟογϡ ʹࡌΔαΠζͷϝϞϦ͕ඞཁ • ݕࡧ࣌͸࡞඼IDΛݩʹొ࿥͞Εͨಛ௃ྔͷۙ๣ू߹Λฦ٫͢Δ • ߋ৽࣌͸ߋ৽ޙͷಛ௃ྔΛҰ࣌తʹอଘɼఆظతʹࠩ෼൓өͯ͠੾Γସ͑

Slide 30

Slide 30 text

ྨࣅը૾ʹΑΔؔ࿈࡞඼ݕࡧ 30

Slide 31

Slide 31 text

ྨࣅը૾ʹΑΔؔ࿈࡞඼ݕࡧ 31

Slide 32

Slide 32 text

ྨࣅը૾ʹΑΔؔ࿈࡞඼ݕࡧ 32

Slide 33

Slide 33 text

4. ྨࣅը૾ݕࡧͷ͜Ε͔Β

Slide 34

Slide 34 text

• ಛ௃ྔม׵ • ݸʑͷը૾σʔλͷྨࣅੑΛఆྔతʹൺֱՄೳͳܗࣜʹม׵͢Δ
 ‎ ఆੑతͳධՁʹ͍ۙ͠ಛ௃ྔม׵ػߏͱͯ͠ͷDeep CNN
 ↪︎ αʔϏεʹಛԽͨ͠”ྨࣅੑ”Λ֫ಘ͢Δ • ۙ๣୳ࡧ • ม׵ͯ͠ಘΒΕͨಛ௃ྔͲ͏͠Λൺֱ͠ɼྨࣅ͢Δू߹Λಛఆ͢Δ
 ‎ ਫ਼౓ͱ଎౓Λཱ྆͢ΔANN(ۙࣅۙ๣୳ࡧ)
 ↪︎ ΑΓߴ଎Ͱߴਫ਼౓ͳANN 34 ྨࣅը૾ݕࡧΛࢧ͑Δٕज़

Slide 35

Slide 35 text

SSD 35 • Single Shot MultiBox Detector • ΦϒδΣΫτҐஔͱΫϥε෼ྨΛҰ ׅͰߦ͏Ϟσϧ • αʔϏεಠࣗͷΧςΰϦΛֶशσʔ λʹ༻͍ͨ

Slide 36

Slide 36 text

Sanny େن໛ECαΠτͷͨΊͷ଎౓ͱਫ਼౓Λཱ྆ͨ͠ ෼ࢄՄೳͳۙࣅۙ๣୳ࡧΤϯδϯ

Slide 37

Slide 37 text

• ΫΤϦͱߴ࣍ݩϕΫτϧू߹Λ೚ҙͷ࣍ݩ਺Ͱ౳෼ͨ͠෦෼ϕΫτϧ୯ҐͰฒ ߦʹۙ๣୳ࡧͨ݁͠Ռͷ࿨ू߹Ͱ͋Δۙ๣ީิ͔Βɼ࠶౓ۙ๣୳ࡧΛߦ͏ɽ 37 ఏҊख๏ (଎౓໘) R@ R@ R@ 9@ 9@ 9@ /SFDPSET // R@ Y@O Y㱨9@ // R@ Y@O Y㱨9@ // R@ Y@O Y㱨9@ \ ^ \ ^ \ ^ BSHNJOE R Y Y㱨\ ^ 㱮 㱮 ෼ղલ ෼ղޙ ᶃ௿࣍ݩۭؒͷฒߦͨۙ͠๣୳ࡧ ᶄݻఆ਺ͷۙ๣ީิͷू໿ ᶅۙ๣ީิͷઢܗ୳ࡧ ᶃ ᶄ ᶅ ଎౓վળ ᶃ ᶄ ᶅ 2VFSZ

Slide 38

Slide 38 text

• ঎඼ಛੑΛΑ͘දݱ͓ͯ͠Γߴਫ਼౓ʹྨࣅ౓͕ൺֱՄೳͳߴ࣍ݩ͔ͭີͳϕΫ τϧͷू߹Λର৅ͱͨۙ͠ࣅۙ๣୳ࡧ • ֶशࡁΈCNNΛಛ௃நग़ثͱͯ͠ར༻ͯ͠ը૾͔ΒಘΒΕΔಛ௃ྔू߹ • ςΩετΛ෼ࢄදݱ΁ม׵͢ΔWord2vec͔ΒಘΒΕΔಛ௃ྔू߹ • ͜ΕΒ͕ɼݕࡧ࣭໰σʔλ(ΫΤϦ)ʹର͢Δߴ࣍ݩϕΫτϧू߹ͷۙ๣୳ࡧ݁ Ռͷ্Ґू߹͕ɼΫΤϦͱߴ࣍ݩϕΫτϧू߹Λ೚ҙͷ࣍ݩ਺Ͱ౳෼ͨ͠෦෼ ϕΫτϧ୯ҐͰۙ๣୳ࡧͨ݁͠Ռͷ্Ґू߹ͱྨࣅ͠΍͍͢͜ͱʹண໨ 38 ఏҊख๏ (ਫ਼౓໘) ෦෼͕ྨࣅ͢Ε͹શମ͕ྨࣅ͢ΔՄೳੑ͕ߴ͍σʔλಛੑ

Slide 39

Slide 39 text

39 Sanny: ఏҊख๏ͷ࣮૷ 4BOOZ 4BOOZ 4BOOZ // // 㱮 // // ᶃ ᶄ ᶅ 2VFSZ "MHPSJTN "MHPSJTN "MHPSJTN • ΫΤϦฒͼʹ୳ࡧର৅σʔλͷ೚ҙ࣍ݩ΁ͷ౳෼ͱ݁Ռͷू໿Λ୲౰͢Δ • ෦෼ϕΫτϧͷۙ๣୳ࡧΞϧΰϦζϜ͸໰Θͳ͍ • ෦෼ϕΫτϧ͝ͱͷ୳ࡧॲཧ͸ಠཱͷͨΊ෼ࢄߏ੒͕Մೳ

Slide 40

Slide 40 text

No content