Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android ThingsでIoT/AIなデバイス開発しよう
Search
masato-ka
August 20, 2018
1
720
Android ThingsでIoT/AIなデバイス開発しよう
masato-ka
August 20, 2018
Tweet
Share
More Decks by masato-ka
See All by masato-ka
Azure MLで試して学ぶAIによる自動走行とAIの仕組みハンズオン
masatoka
2
510
Azureで試して学ぶAI CAR自動走行の仕組みハンズオン
masatoka
0
460
JetsonNanoで動く深層強化学習を使ったラジコン向け自動運転ソフトウェアの紹介
masatoka
1
1.4k
Visual Studio Codeで始めるWio LTE
masatoka
0
1.8k
非接触温度センサのデータをLagoonで可視化
masatoka
0
1.5k
AndroidThingsのドライバーの話
masatoka
0
250
AndroidThingsでAI X IoT
masatoka
0
1.4k
Azure SORACOM Futabaのサーボで金賞もらった話
masatoka
0
420
生活をUP!させるIoTサービスLift!
masatoka
1
2.3k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Fireside Chat
paigeccino
34
3.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How STYLIGHT went responsive
nonsquared
95
5.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
YesSQL, Process and Tooling at Scale
rocio
169
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Transcript
Android ThingsͰIoT/AIͳ σόΠε։ൃ͠·͠ΐ͏ɻ 2018/08/20 @masato_ka(·͞ͱ͔)
ࠓͷLTͷ༰ Android ThingsΛ͏ͱخ͜͠ ͱͰ͢ɻ
Android Thingsͬͯͳʹʁ • Android(Android O)ϕʔεʹIoTσόΠε͚ʹΧελϚ Πζͨ͠OS • ̎̌̍̔ 5݄ʹVer 1.0.0ʢ8݄Ͱ
Ver1.0.3ʣ • Things Support LibraryͰσόΠεͷपล I/OʹΞΫηεͰ͖Δɻ • ΠϯετʔϧͰ͖ΔΞϓϦ1ͭͰΞϓϦέʔγϣϯ͕ࣗಈىಈ͢Δɻ • Raspberry Pi 3BͳͲෳͷϘʔυʹରԠ͍ͯ͠Δɻ • LenovoͷSmart Display͕Android Things 1.0.0ൃͷϓϩμΫτ ༻్: Raspberry PiͰ࡞ΕΔσόΠεେମ࡞ΕΔɻ
AndroidThingsͬͯΔਓ͋Μ·Γฉ͔ͳ͍ɻ •Android Thingsɻɻɻ ※Arduinoѹత͗͢ΔͨΊআ֎
ʲࠓͷϞνϕʔγϣϯʳ ̍ɽAndroid Thingsͷ͍͍ͱ͜Λͬͱͬͯʂ ̎ɽAndroid ThingsΛ͏ਓΛ૿͍ͨ͠
ͰɺAndroid ThingsΛ͏ͱԿ͕خ͍͠ͷʁ
Android Things ͷ࠷ߴͳ3ͭͷϙΠϯτ 1. User-space driver •ಠࣗͷσόΠεΛAndroidͷAPIʹ౷߹ 2. σόΠεͷAIͷΈࠐΈ •ΠϯελϯτʹAIػೳΛσόΠεʹՃ
3. Ϋϥυͱͷ࿈ܞ •σόΠεϚωδϝϯτؚΊͨΫϥυ࿈ܞ
पลI/OΛAndroidͷAPIͰѻ͑ΔΑ͏ʹ͢Δɻ Android Things OS UART I2C/SPI PWM I/O 1.User-space driver
GPSϞδϡʔϧ ηϯα/LED/OLED ϥδίϯαʔϘ SW/LED ※I2SAudio APIͰΞΫηε͢Δɻ Things Support Library Location HID Sensor LoWPAN Location API View Sensor LoWPAN User-space driver AndroidAPI User application
SPIଓλονεΫϦʔϯͷHIDυϥΠόΛ࣮ • SPIͷೖྗͰ͋ͬͯAndroidͷը໘࣮ͱͯ͠ѻ͑Δɻ
User-space driverͷ࠷ߴͳϙΠϯτ • ΞϓϦέʔγϣϯͷϙʔλϏϦςΟΛߴΊΔɻ खࠒͳσόΠε͕ͳ͍ʂ AndroidͰཁ݅ݕ౼ Android ThingsͰ ϓϩτλΠϐϯά ηϯαͰԿΛܭଌʁ
Ϋϥυଆͱ ͷػೳ୲ ௨৴ํࣜʁ ϢʔβώΞͷ ϞοΫ ΞϓϦྲྀ༻ͯ͠ཁ݅ʹ͋ͬ ͨϋʔυΣΞΛ࡞Δɻ ͋ΓͷͰσόΠε։ൃΛޮతʹਐΊΒΕΔɻ
• Android ThingsͷAITensorflow-Lite͔FirebaseML Kit Λར༻Ͱ͖Δɻ 2.σόΠεͷAIͷΈࠐΈ Android Things DNN Model
User Application ɾInception-v3 ɾmobilenet ɾmobilenet-ssd ɾFirebase (Mobile͚ͷBaaS) ɾAndroid Things͔Βར༻Մೳ TensorFlow LiteΛ͏͚ͩͳΒ RaspbianͰͰ͖Δɻ
AIػೳͷ࠷ߴͳϙΠϯτ • Firebase ML KitͰΤοδAIΛ؆୯࣮ݱ&ӡ༻·ͰΧόʔ 1. ̑छྨͷೝࣝػೳͱΧελϜϞσϧ(tfliteܗࣜ) • ςΩετೝࣝɺإ/ಛࣝผɺQRίʔυ2࣍ݩόʔίʔυɺը૾ͷϥϕ Ϧϯά(γʔϯೝࣝ)ɺϥϯυϚʔΫൃݟ(౦ژλϫʔͱ͔)ɺΧελϜϞσ
ϧ(tflite) 2. DNNϞσϧͷཧ৴͕ߦ͑Δɻ • Ϟσϧ͚ͩΛωοτϫʔΫӽ͠ʹߋ৽Ͱ͖Δɻ ※ TPU(GoogleͷAI͚ASIC)ʹରԠ༧ఆ
3. Ϋϥυͱͷ࿈ܞ •Cloud IoT CoreͷΫϥΠΞϯτϥΠϒϥϦ • Cloud IoT CoreΛىʹGCPͱଓͰ͖Δɻ •Android
Things Console • Android ThingsͷOSΞϓϦͷཧΛ͢ΔαʔϏε Ҿ༻ɿhttps://developers-jp.googleblog.com/2018/07/android-things-client-library-for.html
Ϋϥυ࿈ܞͷ࠷ߴͳϙΠϯτ •GCPͷଓ͕؆୯ •Cloud IoT CoreϥΠϒϥϦ •σόΠεϚωδϝϯτػೳ͕σϑΥϧτ •OSΞοϓσʔτʢOTAʣ •ΞϓϦέʔγϣϯͷ৴ʢOTAʣ σόΠεͷσʔλૹ৴ͱσόΠεϚωδϝϯτ
ͦ͏ݴͬͯਏ͍ͱ͜Ζ͋ΔΜͰ͠ΐʁ
Android Thingsͷਏ͍ϙΠϯτ
Android Thingsͷਏ͍ϙΠϯτ • Androidʹؔ͢ΔࣝΛڧཁͯ͘͠Δɻ • ͍ʹAndroidͷάάϥϏϦςΟߴ͍ɻάάΕͳΜͱ͔ͳΔɻ • JavaͰ։ൃ͢ΔͷͩΔ͍ʢࢲJava͖Ͱ͢ʣ • Android
Studio(InteliJ IDEA)ͷ͍ํΛ֮͑Δͱָ͘͠ͳΔɻ • Ͳ͏ͯ͠ݏͳΒKotolin • ରԠϋʔυΣΞ • ݸਓͰ࣮࣭Rspberry Pi 3B Ұɺ3B+ૣ͘དྷͯ͘Εɻ • ηΩϡϦςΟ • ϓϩμΫτʹ͢Δʹϙʔτดͨ͡ΓϢʔβݖݶઃఆͨ͠Γɻ • ଞͷϘʔυಉͩ͡ͱࢥ͏ɻ • Thingsࣗͷใ͕·ͩ·ͩগͳ͍ɻ • ΈΜͳͰͬͯΤίγεςϜ࡞͍͖ͬͯ·ͤΜʁ • ύΠΦχΞਫ਼ਆͰऔΓΊΔɻ
Android Things CAMP #2 (2018/08/26) • গ͠ͰڵຯΛ࣋ͬͨΒੋඇࢀՃ͍ͩ͘͞ʂ(͘͘ձͰ͢) • νϡʔτϦΞϧ·Ͱ͓͖߹͍͠·͢ɻ •
Android ΤϯδχΞ͓ͪͯ͠·͢ɻ(࣮)
͓͠·͍ ※ৄࡉhttp://masato-ka.hatenablog.com/entry/2018/07/22/202525