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
520
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
260
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
Automating Front-end Workflow
addyosmani
1366
200k
A Modern Web Designer's Workflow
chriscoyier
693
190k
A Tale of Four Properties
chriscoyier
157
23k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Git: the NoSQL Database
bkeepers
PRO
427
64k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Designing for Performance
lara
604
68k
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