Upgrade to Pro — share decks privately, control downloads, hide ads and more …

20180210_Cookpad_TechConf2018_YoheiKIKUTA

yoppe
February 10, 2018

 20180210_Cookpad_TechConf2018_YoheiKIKUTA

Talk at Cookpad TechConf 2018 ( https://techconf.cookpad.com/2018/ ).

yoppe

February 10, 2018
Tweet

More Decks by yoppe

Other Decks in Technology

Transcript

  1. ݚڀ։ൃ෦ͷऔΓ૊Έɿֶज़ํ໘΁ͷߩݙ 11 ɾ֤छֶձ΁ͷ࿦จ౤ߘ΍εϙϯαʔ
 ɹ IJCAI, SIGIR, JSAI, ALNP, IPSJ, CEA,

    XSIG2017, … ɾݚڀ༻ʹσʔληοτΛఏڙ
 ɹ https://www.nii.ac.jp/dsc/idr/cookpad/cookpad.html ɾίϯϖςΟγϣϯ༻ʹ໰୊ઃఆͱσʔληοτΛఏڙ
 ɹ- ਓ޻஌ೳٕज़ઓུձٞ౳ओ࠵ ୈ1ճAIνϟϨϯδίϯςετ
 ɹ https://deepanalytics.jp/compe/31 20170331ऴྃ
 ɹ- JSAI Cup 2018 ਓ޻஌ೳֶձσʔλղੳίϯϖςΟγϣϯ
 ɹ https://deepanalytics.jp/compe/59 20180329క੾
  2. ࣮ۀ຿ʹ͓͚Δը૾෼ੳͷࠔ೉ɿͦ΋ͦ΋ղ͚͍ͯΔ໰୊Ͱ͸ʁ 13 ෼ྨ໰୊͸ʮղ͚ͨʯ 0 7.5 15 22.5 30 2010 2011

    2012 2013 2014 2015 2016 2017 2.25 2.99 3.57 7.41 11.2 15.3 25.8 28.2 Classification error [%] Deep Learning !! human ability
  3. ࣮ۀ຿ʹ͓͚Δը૾෼ੳͷࠔ೉ɿͦ΋ͦ΋ղ͚͍ͯΔ໰୊Ͱ͸ʁ 15 ཧ૝ ≠ ݱ࣮ ɾద੾ͳϥϕϧͷ෇༩ɿ˚ ͋Δఔ౓σʔλྔͰΧόʔՄೳ ɾద੾ͳΧςΰϦͷઃܭɿ☓ {ϥʔϝϯ, ύελ,

    ΧϧϘφʔϥ} ͳͲ ɾclosed setɿ☓ ςετσʔλ͸ଟ༷Ͱ͔ͭಈత ͦ΋ͦ΋࣮αʔϏεͰղ͘΂͖໰୊͸ଟ͘ͷ৔߹ ”ؒҧ͍ͬͯΔ”
 → trial & error Ͱղ͘΂͖໰୊͕Կ͔Λ໌Β͔ʹ͍ͯ͘͠ͷ͕ओ୊
  4. ۩ମతͳࣄྫɿྉཧ͖Ζ͘Ͱͷྉཧ/ඇྉཧ෼ྨ ɾTechConf2017 Ͱ΋঺հ ɾྉཧͷࣸਅΛࣗಈతʹ෼ྨͯ͠දࣔɹ ɹ- CNNʹΑΔ෼ྨͰྉཧը૾Λநग़ ɹ- ৯ࣄͷৼΓฦΓ΍ͭ͘ΕΆͷଅਐ ɾ20180206࣌఺Ͱ ɹ-

    Ϣʔβ਺ɿ19ສਓҎ্ ɹ- ྦྷੵྉཧຕ਺ɿ1900ສຕҎ্ 17 ྉཧ͖Ζ͘ͷਐԽͱݱࡏ https://speakerdeck.com/ayemos/real-world-machine-learning
  5. ۩ମతͳࣄྫɿྉཧ͖Ζ͘Ͱͷྉཧ/ඇྉཧ෼ྨ 18 ػցֶशͷ؍఺͔Βॏཁͳ఺ ɾΫΠοΫελʔτ ɹը૾෼ੳͷ஌ݟ͕ෆे෼ͳͱ͖͔Β CaffeNet Ͱૉૣ࣮͘૷ ɾϞσϧͷվળͱۤखͳΧςΰϦͷߟྀ ɹ Inception

    V3 ͷ࢖༻΍ multi-class Ϟσϧͷ࢖༻ ɾςετσʔλͷ֦ॆ ɹࣾһ͔ΒσʔλΛूΊ࣮ͯ؀ڥʹ͍ۙঢ়گͰݕূ ɾہॴੑΛऔΓࠐΉͨΊͷύονԽ ɹࣸਅͷҰ෦ʹྉཧ͕͍ࣸͬͯΔঢ়گʹదԠ http://techlife.cookpad.com/entry/2017/09/14/161756
 http://techlife.cookpad.com/entry/2017/11/08/132538
  6. ۩ମతͳࣄྫɿྉཧࣸਅͷϨγϐΧςΰϦ෼ྨ 21 ػցֶशͷ؍఺͔Βॏཁͳ఺ ɾ෼ྨͷର৅ͱͳΔΧςΰϦͷઃܭ ɹαʔϏεͱ݉Ͷ߹͍ΛਤΓͭͭ༧ଌର৅ΧςΰϦΛબఆ ɾྨࣅΧςΰϦʹର͢Δ෼ྨ ɹ ΧςΰϦؒͷྨࣅ౓͕େ͖͘ҟͳΔͷͰఆྔతͳධՁ๏ΛߟҊ ɾopen set

    ͳ෼ྨ໰୊ʹ͓͚Δ precision ͷ֬อ ɹOne vs. Rest ෼ྨثΛ૊Έ߹Θͤͯ precision ΛߴΊΔΑ͏ௐ੔ ɾධՁํ๏ͷઃܭ ɹΦϯϥΠϯͰ͸ϑΟʔυόοΫɺΦϑϥΠϯͰ͸σʔλ࡞੒ ࿦จ : https://arxiv.org/abs/1802.01267
  7. ۩ମతͳࣄྫɿྉཧࣸਅͷϨγϐΧςΰϦ෼ྨ 23 ɾ࣮ࡍͷΧςΰϦઃܭͷεςοϓ ɹ- ϝλσʔλ͔ΒશΧςΰϦΛநग़ʢશ෦Ͱ1,000ΧςΰϦఔ౓ʣ ↓ ɹ- ࢹ֮తͰͳ͍΋ͷ΍਺͕গͳ͍΋ͷΛআ֎ʢେࡼྉཧͳͲʣ ↓ ɹ-

    αʔϏεʹ͓͍ͯ༗༻ͦ͏ͳ΋ͷΛਓྗͰநग़ʢ͜͜ॏཁʣ ↓ ɹ- ޡ෼ྨʹجͮ͘ྨࣅ౓Ͱ౷ഇ߹ʢ࠷ऴతʹ50ΧςΰϦఔ౓ʣ ྫʣ΍͖ͦ͹ͱϏʔϑϯΛಉ͡ΧςΰϦͱͯ͠౷߹
  8. ۩ମతͳࣄྫɿྉཧࣸਅͷϨγϐΧςΰϦ෼ྨ 24 ɾprecision ΛߴΊΔͨΊʹ One vs. Rest ෼ྨثʹΑΔϞσϧΛߏங ɹ- ར఺ɿݸʑͷΧςΰϦʹ߹Θͤͨॊೈͳઃܭ͕Մೳ

    ɹ- ܽ఺ɿॱ൪΍ᮢ஋ͳͲ hand crafted ͳ෦෼΋গͳ͘ͳ͍ feature extractor for c in {αϥμ, ύελ, …} 0 1 ྉཧը૾Ͱ
 pre-train ͨ͠
 Inception V3 1 0 αϥμ next next f2 ͸ྨࣅ౓͕ߴ͍ΧςΰϦ ͚ͩΛूΊֶͯशͨ͠ One vs. Rest ෼ྨث
  9. ۩ମతͳࣄྫɿը૾෼ྨϞσϧͷϞόΠϧ΁ͷҠ২ 26 ػցֶशͷ؍఺͔Βॏཁͳ఺ ɾਫ਼౓Λग़དྷΔݶΓམͱͣܰ͞ྔͳϞσϧΛ࡞Δ ɹܰྔԽΛ໨తͱͨ͠ߏ଄΍ྔࢠԽͳͲͷཧղ ɾϞόΠϧଆͱͷ࿈ܞ ɹ iOS ΍ Android

    ଆͷ஌ݟ͕ෆՄܽ ɾ৘ใ͕গͳ͍தͰͷϓϩδΣΫτਪਐ ɹ ػցֶशͱϞόΠϧͷͦΕͧΕͷྖҬͰਂ͍ཧղ͕ॏཁ ɾϥΠϒϥϦͷόʔδϣϯґଘੑͳͲΛద੾ʹѻ͏ ɹྫʣcoremltools ͸ 201802 ·Ͱ͸ python 2.7 ܥͰͷΈར༻Մ
  10. ۩ମతͳࣄྫɿը૾෼ྨϞσϧͷϞόΠϧ΁ͷҠ২ 27 ɾྉཧ/ඇྉཧ෼ྨϞσϧΛϞόΠϧʹҠ২ ɹ- MobileNet ͱہॴԽͷͨΊͷύονԽΛ߹Θͤͨߏ଄ ɹ- αʔό্ͷ࣮ݧʢը૾20,000ຕఔ౓ʣͰ 1% ఔ౓ͷਖ਼౴཰ͷࠩ

    ɹ- iOS, Android ڞʹ࣮ػͰݕূ͓ͯ͠Γಉఔ౓ͷੑೳ ɾBristol ΦϑΟε΁ͷग़ு࣌ʹਐΊͨϓϩδΣΫτ ɹ- iOS, Android ΤϯδχΞʹڠྗͯ͠΋Β͍ҰؾʹਐΜͩ ɹ- ࠃ಺֎ͰਐΊ͍͚ͯͦ͏ͳτϐοΫ
  11. ۩ମతͳࣄྫɿը૾෼ྨϞσϧͷϞόΠϧ΁ͷҠ২ 28 ɾAndroid (Pixel 2 at Bristol) Ͱͷ࣮ݧ݁Ռ Original Quantized

    Model Size 12 [MB] 3.3 [MB] Accuracy 0.97 0.97 Precision 0.98 0.98 Recall 0.96 0.96 CPU Usage 40-60 [%] 40-60 [%] Memory Usage 120 [MB] 90 [MB] FPS 7.54 [FPS] 7.72 [FPS] DEMO