20180701_CVPR2018_reading_YoheiKIKUTA

A182964bc0a261a5fc8bb207d660c743?s=47 yoppe
July 01, 2018

 20180701_CVPR2018_reading_YoheiKIKUTA

A182964bc0a261a5fc8bb207d660c743?s=128

yoppe

July 01, 2018
Tweet

Transcript

  1. 1.

    MobileNetV2: Inverted Residuals and Linear Bo!lenecks ୈ46ճ ίϯϐϡʔλϏδϣϯษڧձ@ؔ౦ 20180701 ٠ా

    ངฏ (@yohei_kikuta) Event URL: https://kantocv.connpass.com/event/88613/, paper: https://arxiv.org/abs/1801.04381
  2. 2.

    ࣗݾ঺հ name: Yohei KIKUTA company: Cookpad Inc. twitter: @yohei_kikuta GitHub:

    yoheikikuta resume: https://github.com/yoheikikuta/resume blog: ݪཧతʹ͸Մೳ https://yoheikikuta.github.io/ 2
  3. 3.

    ·ͱΊ 1. MobileNetV1 ͔Βൃలͤͨ͞Ϟσϧ 2. ઢܕ૚ͷؒʹνϟϯωϧ਺Λ֦େͯ͠ separable convolution ΛೖΕΔͱ͍͏ building

    block ΛఏҊ → ReLU ͷ(ඇ)ઢܗੑͱදݱྗΛߟ࡯ͨ݁͠Ռͷߏ଄ 3. ࣮ݧͰ΋ NASNet ΑΓߴ଎Ͱಉ౳Ҏ্ͷ݁Ռ 4. ML Kit Λ࢖ͬͯ mobile Ͱ࣮ࡍʹಈ͔ͯ͠Έͨ → ΫοΫύου։ൃऀϒϩά Blog URL: [https://techlife.cookpad.com/entry/2018/07/05/090000 3
  4. 5.
  5. 6.

    mobile ʹࡌΔܰྔͳϞσϧΛ࡞Γ͍ͨ ػցֶशͷ mobile Ҡߦ͕ਐΜͰ͍͖ͦ͏ ML Kit ΍ Create ML

    ͳͲͷొ৔Ͱػӡ͕ߴ·͍ͬͯΔ εϐʔυ΍ϓϥΠόγʔ΍εέʔϥϏϦςΟ౳ͷ؍఺Ͱॏཁ deep learning ʹ͓͍ͯ΋ architecture ୳ࡧͷҰͭͷํ޲ੑ ML Kit: https://developers.google.com/ml-kit/, Create ML: https://developer.apple.com/documentation/create_ml 6
  6. 7.

    mobile ༻ͷϞσϦϯάͷํ޲ੑ architecture ʹؔͯ͠͸ۭؒํ޲ͱνϟϯωϧํ޲ͷऔΓѻ͍ Λ޻෉͢Δͷ͕Ұͭͷைྲྀ → {separable, group, shuffle} convolution

    ͳͲ͕୅දత ଞʹ΋ܰྔԽͷٕज़͕͋Δ͕ຊ࿦จͷείʔϓ֎ʢซ༻΋Մʣ - ਺஋ਫ਼౓Λམͱ͢͜ͱʹΑΔσʔλαΠζͷ࡟ݮ - ྔࢠԽ΍ූ߸ԽʹΑΔσʔλαΠζͷ࡟ݮ - ৠཹͳͲΛ༻͍ͨΑΓখ͞ͳϞσϧ΁ͷస׵ 7
  7. 10.

    architecture ͷมભ ಛ௃తͳߏ଄Λ΋ͨΒͨ͠ CNN ͷϞσϧΛҰ෦঺հ - Network In Network: Gloval

    average pooling - VGG: Stacking of 3 3 convolution - ResNet: Residual connection - Inception(V3): Inception module - SqueezeNet: Fire module - ENet: Early stage down sampling - DenseNet: Dense convolution - Xception: Separable convolution - SENet: Squueze and excitation block 10
  8. 11.

    architecture ͷࣗಈ୳ࡧ convolution ͳͲͷجຊతͳԋࢉͷύλʔϯΛ͍͔ͭ͘४උ ͦΕΒΛ૊߹ͤͯ࠷దͳ building block Λ୳ࡧ - NASNet

    ڧԽֶशͷ࿮૊ΈͰ࠷దԽ - AmoebaNet ਐԽܭࢉͷ࿮૊ΈͰ࠷దԽ - DARTS ࿈ଓ؇࿨໰୊ͱͯ͠ޯ഑๏ϕʔεͰ࠷దԽ NASNet: https://arxiv.org/abs/1707.07012, AmoebaNet: https://arxiv.org/abs/1802.01548, DARTS: https://arxiv.org/abs/1806.09055 11
  9. 13.

    ܰྔͳ architecture ͷ୳ࡧ ࣗಈ୳ࡧ͸ڧྗ͕ܾͩΊΒΕͨԋࢉͷ࿮಺Ͱͷ૊߹ͤ → ܭࢉྔతʹઙ͍૚਺Ͱ૊Ή architecture ͸ௐ΂΍͍͢ ͜ΕΑΓߴੑೳͳϞσϧΛ࡞Δʹ͸৽͍͠ΞΠσΞ͕ඞཁ MobileNetV2

    Ͱ͸ ReLU ͷಛ௃ʹண໨ͨ͠ߏ଄Λݕ౼ → ReLU ʹಛԽͨ͠৽͍͠ building block ΛߟҊ ൚༻తͰͳ͍͔΋͠ΕΜ͕ߏΘΜʂͱ͍͏੎͍Λײ͡Δ MobileNetV1 ͷվળΛߟ͑ͨ݁Ռͱͯ͠ḷΓண͍ͨΑ͏ʹࢥΘΕΔ 13
  10. 16.

    ReLU ͷදݱྗ ReLU( ) ͳΔม׵Ͱඇθϩͷ volume ͕࢒Δ৔߹Λߟ͑Δ ͷ಺෦ʹ map ͞ΕΔ఺͸

    ͱ͍͏ઢܗม׵ͦͷ΋ͷ → ग़ྗͷඇθϩྖҬʹ͓͚Δදݱྗ͸ઢܗม׵ ReLU Ͱ௵ΕΔྖҬ΋͋ΔͷͰҰൠʹ৘ใ͕૕ࣦ͢Δ͕ɺ ௵ΕΔྖҬԼݶ͸ ͳΔ ReLU ม׵Ͱ ͷͱ͖ ূ໌͸ݪ࿦จͷ Appendix A ͷ Theorem 1 ͷ Proof 16
  11. 17.

    ReLU ͷલޙͰνϟϯωϧ਺Λे෼େ͖͘͢Ε͹৘ใ͸૕ࣦ͠ͳ͍ ௿࣍ݩ mfd. Λ dim = m ࣍ݩʹม׵ͯ͠ ReLU

    ͯ͠ݩʹ໭͢ m ͕খ͍͞ͱ৘ใ͕૕ࣦ͢Δ͕ɺେ͖͚Ε͹૕ࣦ͠ͳ͍ ҰํͰେ͖͗͢Δͱมܗ͕ஶ͍͠෦෼΋ݱΕΔ → νϟϯωϧ਺ͷ֦େ͸దਖ਼஋͕͋Δʢ࿦จͰ͸ 6 ഒʣ ਤ͸ https://arxiv.org/abs/1801.04381 ΑΓҾ༻, 6 ഒ͸͜ͷਤͰݴ͑͹ dim=12 ͱͳΔ͜ͱʹ஫ҙʢͦͷ৔߹΋ਤ͓ࣔͯ͘͠΂͖ؾ΋͢Δ͕ʣ 17
  12. 18.

    ReLU Λ࢖ͬͨߏ଄ͷॏཁͳ఺ͷ·ͱΊ ͜Ε·Ͱͷ؍ଌΛৼΓฦΔͱҎԼͷೋ఺͕ॏཁ - ReLU ʹΑΔม׵ޙʹඇθϩͱͳΔྖҬ͸ઢܗม׵ʹରԠ → linear layer ΛೖΕͯಛ௃ྔΛநग़͢Δͷ͕ྑͦ͞͏

    - ReLU ʹΑΔ৘ใ૕ࣦ͸ม׵ޙͷνϟϯωϧ਺૿ՃͰ๷͛Δ → ී௨ͷ residual ͷνϟϯωϧ਺มԽͱ͸ٯύλʔϯ ͜ΕΛ࢖ͬͯ৽͍͠ building block ΛఏҊ͢Δ 18
  13. 20.

    Inverted residuals and linear bo!lenecks residual connection ͷ͋Δࣼઢͷ૚͸ linear activation

    ෯͸νϟϯωϧ਺ͰதؒͰେ͖͘ͳΔΑ͏ʹઃܭ தؒͷ૚Ͱ͸ separable convolution Λ࢖༻ ਤ͸ https://arxiv.org/abs/1801.04381 ΑΓҾ༻ 20
  14. 22.

    Inverted residuals and linear bo!lenecks (bo!leneck) ͷܭࢉྔ k×k convolution with

    s=1 Ͱ Λߟ͑Δ normal convolution: separable convlution: → bottleneck: = 22
  15. 23.

    Inverted residuals and linear bo!lenecks (bo!leneck) ͷܭࢉྔ ௨ৗͷ residual block

    ͱൺ΂ͯܭࢉྔ͕গͳ͍Θ͚Ͱ͸ͳ͍ bottleneck ͷೖྗͷνϟϯωϧ͸ൺֱతখ͘͞Ͱ͖Δ͕ɺ தؒͷ૚Ͱνϟϯωϧ਺Λ֦େ͢ΔͷͰҰൠʹ͸ඇࣗ໌ ʢೖྗ͕ݮΒͤΔͷ͸௿࣍ݩ mfd. ʹ৘ใ͕ॅΉͱ͍͏Ծఆʣ → ݁Ռͱͯ͠͸ܭࢉྔ multipy-adds (MAdd) ͕ݮΒͤΔ ύϥϝλௐ੔Λ͠ͳ͕Β architecture Λ࡞ͬͨΒܭࢉྔΛ཈্͑ͨͰਫ਼౓͕ߴ͍΋ͷ΋࡞Εͨͱ͍͏ఔ౓ͱࢥ͏ 23
  16. 24.

    Inverted residuals and linear bo!lenecks (bo!leneck) ͷϝϞϦޮ཰ ೖྗνϟϯωϧ਺ΛݮΒͤΔͷ͸ϝϞϦͷ؍఺͔Β͸༗ར ਪଌ࣌ʹඞཁͱͳΔ max

    ͷϝϞϦ͸ҎԼͷࣜͰܾ·Δ ೖྗͱग़ྗͷ࣍ݩ͕ॏཁʹͳΔͷͰ MobileNetV2 ͕༗ར ʢதؒͷ૚͸࢖͍ࣺͯͩ͠νϟϯωϧຖʹॲཧ͕Ͱ͖Δ ʣ ฒྻʹܭࢉ͢ΔͳΒෳ਺νϟϯωϧͷ৘ใΛಉ࣌ʹඞཁͱࢥ͏͕ɺCPU ͰͷܭࢉΛ૝ఆ͍ͯ͠Δͦ͠͏͍͏͜ͱͬΆ͍ʁ 24
  17. 31.

    ઢܕੑͷॏཁੑͱ skip connection ͷுΓํʹؔ͢Δ࣮ݧʢImageNet classification) linear bottleneck ʹඇઢܗੑΛೖΕΔͱਫ਼౓͕མͪΔ skip connection

    ͸ bottleneck ؒʹுΔͷ͕ྑ͍ ʢલऀ: ReLU ʹؔ͢Δߟ࡯ͱ߹கɺޙऀ: ୯ʹ࣮ݧͷ݁Ռʣ ਤ͸ https://arxiv.org/abs/1801.04381 ΑΓҾ༻ 31
  18. 33.

    ML Kit ͱ͸ Mobile app. ޲͚ʹػցֶशػೳΛ૊ΈࠐΉͨΊͷ SDK Firebase ͷػೳͱͯ͠ఏڙ͞Ε͍ͯΔ ݱ࣌఺ͰαϯϓϧͰ͸ͳͯࣗ͘෼Ͱ४උͨ͠

    custom model Λಈ͔͢ͷ͸݁ߏେม... ؤுͬͯಈ͘Α͏ʹͨ͠ɿFirebase ML KitͰࣗ࡞ͷΧελϜ ϞσϧΛ࢖ͬͯྉཧɾඇྉཧը૾Λ൑ఆͰ͖ΔΑ͏ʹͨ͠ ML Kit: https://developers.google.com/ml-kit/, Firebase: https://firebase.google.com/ 33
  19. 34.
  20. 35.

    ·ͱΊʢ࠶ܝʣ 1. MobileNetV1 ͔Βൃలͤͨ͞Ϟσϧ 2. ઢܕ૚ͷؒʹνϟϯωϧ਺Λ֦େͯ͠ separable convolution ΛೖΕΔͱ͍͏ building

    block ΛఏҊ → ReLU ͷ(ඇ)ઢܗੑͱදݱྗΛߟ࡯ͨ݁͠Ռͷߏ଄ 3. ࣮ݧͰ΋ NASNet ΑΓߴ଎Ͱಉ౳Ҏ্ͷ݁Ռ 4. ML Kit Λ࢖ͬͯ mobile Ͱ࣮ࡍʹಈ͔ͯ͠Έͨ → ΫοΫύου։ൃऀϒϩά 35