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
450
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.3k
Azure SORACOM Futabaのサーボで金賞もらった話
masatoka
0
410
生活をUP!させるIoTサービスLift!
masatoka
1
2.3k
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Agile that works and the tools we love
rasmusluckow
327
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
400
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Ruby is Unlike a Banana
tanoku
96
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
830
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
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