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

Core ML / Vision Frameworkを使ってできること / What can ...

Core ML / Vision Frameworkを使ってできること / What can we achieve using Core ML and Vision framework

2017/06/30 WWDC - Developer's Living #lifull_wwdc

Shinichi Goto

June 30, 2017
Tweet

More Decks by Shinichi Goto

Other Decks in Programming

Transcript

  1. Core ML / Vision Framework Λ࢖ͬͯͰ͖Δ͜ͱ ɹ 2017/06/30 WWDC -

    Developer's Living @ LIFULL shingt (Shinichi Goto)
  2. 4

  3. 8

  4. 9

  5. 10

  6. Core ML • ֶशࡁͷModelΛར༻ͯ͠ͷਪ࿦ʹಛԽ • Core ML model format (**.mlmodel)

    • Xcode͕Swi6ͷΠϯλʔϑΣΠεΛࣗಈੜ੒ • αϯϓϧϞσϧ΋Apple͕ެ։ • Accerelate / Metal্ʹࡌ͓ͬͯΓϋΠύϑΥʔϚϯε • coremltools 11
  7. ɹ let animalModel = AnimalModel() if let prediction = try?

    animalModel.prediction(animalImage: image) { return prediction.animalType } 12
  8. ɹ let animalModel = AnimalModel() if let prediction = try?

    animalModel.prediction(animalImage: image) { return prediction.animalType } 13
  9. ɹ let animalModel = AnimalModel() if let prediction = try?

    animalModel.prediction(animalImage: image) { return prediction.animalType } 14
  10. ɹ let animalModel = AnimalModel() if let prediction = try?

    animalModel.prediction(animalImage: image) { return prediction.animalType } 15
  11. 17

  12. Vision Framework • Core ML্ʹࡌͬͨը૾ೝࣝɾ෺ମݕग़ͳͲͷը૾ղੳ༻ͷϑϨʔϜϫʔΫ • Detec,on • Face, Face

    landmarks, Rectangle, Barcode, Text, Horizon • طଘͷ΋ͷ΋ਫ਼౓޲্ʢDeep Learningͷ׆༻ʣ • Tracking • Image Registra,on • Core MLͱͷ૊Έ߹Θͤ 20
  13. 21

  14. 23

  15. 27

  16. 28

  17. 31

  18. YOLO • YOLO (You only look once) • ߴ଎ͳ͜ͱ͕ಛ௃ͷ෺ମݕग़༻ͷ χϡʔϥϧωοτϫʔΫ

    • h1ps:/ /www.youtube.com/watch? v=VOC3huqHrss • ͜Ε͸ҰൠతͳYOLO 32
  19. • iOSࣄྫ • YOLO: Core ML versus MPSNNGraph • Core

    MLΛ༻͍ͯiOS্ͰYOLOΛಈ࡞ • Tiny YOLOʢެ։͞Ε͍ͯΔModelʣΛར༻ 33
  20. 34

  21. Goodfellow, Ian J.; Pouget-Abadie, Jean; Mirza, Mehdi; Xu, Bing; Warde-Farley,

    David; Ozair, Sherjil; Courville, Aaron; Bengio, Yoshua. GeneraIve Adversarial Networks. arXiv:1406.2661, 2014. 36
  22. Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representa>on learning

    with deep convolu>onal genera>ve adversarial networks. arXiv preprint arXiv:1511.06434, 2015. 37
  23. • GAN (Genera+ve Adversarial Nets) • ֶशσʔλͱࣅͨσʔλΛੜ੒͢ΔϞσϧͷҰछ • iOSࣄྫ •

    Crea+ve AI on the iPhone: Genera+ve Adversarial Networks (GAN) with Apple's CoreML Tools • MNISTΛσʔληοτͱͯ͠ɺCore MLΛ༻͍ͯiOS্Ͱ਺ࣈ ʢʹࣅͨʣը૾Λੜ੒ 38
  24. 39

  25. Summary • Core ML / Vision Framework • iOS্Ͱͷը૾ղੳٕज़ͷར༻ϋʔυϧ͕௿Լ •

    ͱ͸͍͑஌ࣝ͸͋Δఔ౓ඞཁʢͱײͨ͡ʣ • Ͱ͖Δ͜ͱ • ը૾ೝࣝ / τϥοΩϯά / ෺ମݕग़ / ը૾ੜ੒ / etc. • Follow @mhollemans 40
  26. ࢀߟηογϣϯ • Introducing Core ML • Core ML in depth

    • Vision Framework: Building on Core ML 41
  27. ࢀߟࢿྉ • iOS 11: Machine Learning for everyone • Google’s

    MobileNets on the iPhone • YOLO: Core ML versus MPSNNGraph • CreaAve AI on the iPhone: GeneraAve Adversarial Networks (GAN) with Apple's CoreML Tools - Zedge • Why Core ML will not work for your app (most likely) • θϩ͔Β࡞ΔDeep Learning 42
  28. ʢิ଍ʣͰ͖ͳ͍͜ͱ / ੍໿ͳͲ • ֶश͸ෆՄ • αϙʔτ͍ͯ͠ΔػցֶशϑϨʔϜϫʔΫʹ͍ͭͯɺಛఆͷόʔδϣϯʹറΒΕΔʢগͳ͘ͱ ΋ݱঢ়͸ʣ • Kerasͷ2.0αϙʔτೖͬͨ͠ɺࠓޙ޿͍͛ͯ͘ͷ͔΋

    • ModelͷαΠζ͕େ͖͗͢Δ໰୊ • RegressionͱClassifica5onͷΈʢ☓ ΫϥελϦϯάɺϥϯΩϯάֶशɺetc.ʣ • ϥϯλΠϜͰϢʔβͷೖྗɾߦಈΛModelʹ൓өͤ͞Δ͜ͱ͸Ͱ͖ͳ͍ • etc. 44