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

Turi Createを試してみる

Turi Createを試してみる

#potatotips #52

Tatsuya Tanaka

June 21, 2018
Tweet

More Decks by Tatsuya Tanaka

Other Decks in Programming

Transcript

  1. Turi CreateΛࢼͯ͠Έͨ
    Tatsuya Tanaka / ాதୡ໵ (@tattn)
    #potatotips #52

    View full-size slide

  2. ాத ୡ໵ (@tattn)
    • Yahoo!৐׵Ҋ಺
    • iOSΞϓϦΤϯδχΞ
    @tattn
    @tanakasan2525
    @tattn

    View full-size slide

  3. Turi Createͱ͸

    View full-size slide

  4. Turi Create
    Apple͕ϝϯςφϯε͍ͯ͠Δ

    ΦʔϓϯιʔεͷػցֶशϞσϧ࡞੒πʔϧ
    2016೥ʹApple͕ങऩͨ͠Turiͱ͍͏ձ͕ࣾ

    ։ൃ͍ͯͨ͠πʔϧΛҾ͖ܧ͍Ͱ͍Δ
    IUUQTHJUIVCDPNBQQMFUVSJDSFBUF
    IUUQTUVSJDPN

    View full-size slide

  5. ಛ௃
    • CoreMLͷϞσϧΛग़ྗͰ͖Δ
    • ΞϧΰϦζϜΑΓ΋λεΫʹ஫ྗ͍ͯ͠Δ
    • ࣮૷ࡁΈͷΞϧΰϦζϜ΍

    ௐ੔ࡁΈύϥϝʔλΛ࢖ͬͯɺಛఆͷ໰୊Λղ͘
    CreateMLͷࢥ૝ʹ͍ۙ

    View full-size slide

  6. λεΫ
    • ϦίϝϯυγεςϜ
    • ը૾෼ྨ
    • ը૾ͷྨࣅੑ
    • ෺ମݕग़
    • ׆ಈ෼ྨ
    • ςΩετ෼ྨ
    • ը෩ม׵ (৽ػೳ: ݱࡏ͸β)

    View full-size slide

  7. ը෩ม׵Λࢼ͢

    View full-size slide

  8. ը෩ม׵ͷֶशʹඞཁͳσʔλ
    • Content Images
    • ม׵͍ͨ͠ը૾ʹ͍ۙը૾
    • Style Images
    • ը෩ม׵ͷϕʔεͱͯ͠࢖͍͍ͨը૾

    View full-size slide

  9. ࠓճ࢖༻ͨ͠σʔλ (Style Images)
    υΩϡϝϯτʹྫͱͯ͠ܝࡌ͞Ε͍ͯͨը૾Λ࢖༻
    IUUQTBQQMFHJUIVCJPUVSJDSFBUFEPDTVTFSHVJEFTUZMF@USBOTGFS

    View full-size slide

  10. ࠓճ࢖༻ͨ͠σʔλ (Content Images)
    WWDCग़ுதʹࡱӨͨ͠ओʹ෩ܠͷࣸਅ΍

    ൿଂͷ࣮ՈͷೣࣸਅΛ࢖༻

    View full-size slide

  11. ←ΠςϨʔγϣϯ਺200ͷ݁Ռ
    ֶश࣌ؒɿ໿2࣌ؒ20෼
    +--------------+--------------+--------------+
    | Iteration | Loss | Elapsed Time |
    +--------------+--------------+--------------+
    | 1 | 147.270 | 24.0 |
    | 2 | 138.627 | 80.9 |
    ....
    | 198 | 54.172 | 8515.3 |
    | 199 | 51.391 | 8556.9 |
    | 200 | 48.198 | 8595.1 |
    +--------------+--------------+--------------+
    MacBook Pro (Retina, 15-inch, Mid 2015)

    OS: High Sierra

    View full-size slide

  12. ஫ҙ఺
    ϞσϧΛଓ͖͔Βֶशͤ͞Δػೳ͕ͳ͍
    IUUQTHJUIVCDPNBQQMFUVSJDSFBUFJTTVFT
    ֶशʹ਺͔͔࣌ؒΔͷͰɺηʔϒ/ϦετΞػೳ͕΄͍͠Ͱ͢...

    View full-size slide

  13. ஫ҙ఺
    WWDC18Ͱൃදͷ͋ͬͨ৽λεΫ͸

    ·ͩGPUαϙʔτ͕੔ͬͯͳ͍͜ͱ͕͋Γ·ͨ͠
    IUUQTHJUIVCDPNBQQMFUVSJDSFBUFJTTVFT

    View full-size slide

  14. ColaboratoryͰֶशͤ͞Δ

    View full-size slide

  15. Colaboratory
    Google͕ఏڙ͍ͯ͠Δϒϥ΢β্Ͱಈ͘Jupyter Notebook؀ڥ
    apt installͰඞཁͳ΋ͷΛೖΕΒΕͨΓɺ

    GPU͕ແྉͰ࢖͍͑ͯ͢͝ʂ

    View full-size slide

  16. Colaboratory
    Style Transfer
    Image Classifier
    IUUQTDPMBCSFTFBSDIHPPHMFDPNHJUIVCUBUUO
    5VSJ$SFBUF1MBZHSPVOECMPCNBTUFS5VSJ$SFBUF@*NBHF$MBTTJpFSJQZOC
    IUUQTDPMBCSFTFBSDIHPPHMFDPNHJUIVCUBUUO
    5VSJ$SFBUF1MBZHSPVOECMPCNBTUFS5VSJ$SFBUF@4UZMF5SBOTGFSJQZOC

    View full-size slide

  17. ·ͱΊ
    ػցֶशͷ஌͕ࣝͳͯ͘΋༻ҙ͞ΕͨλεΫͰ
    ໘ന͍ΞϓϦ͕࡞Εͦ͏
    ColaboratoryͰ΋ಈ͔ͤΔ
    ʘLet's ػցֶशʗ

    ʘʘ\\٩( 'ω' )و //ʗʗ

    View full-size slide

  18. Reference
    • A Guide To Turi Create - WWDC18
    • https://developer.apple.com/videos/play/wwdc2018/712/
    • Turi Create - GitHub
    • https://github.com/apple/turicreate/
    • ʲඵ଎ͰແྉGPUΛ࢖͏ʳਂ૚ֶश࣮ફTips on Colaboratory
    • https://qiita.com/tomo_makes/items/b3c60b10f7b25a0a5935

    View full-size slide