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に自作AIをのっけたい
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
bugdog24
March 25, 2023
Programming
140
0
Share
Androidに自作AIをのっけたい
Tensorflow Liteを使ってAndroidに自作AIをのっける話です。
bugdog24
March 25, 2023
More Decks by bugdog24
See All by bugdog24
KSPで自動生成コードを作る
bugdog24
0
220
Flutter入門講座
bugdog24
0
170
Other Decks in Programming
See All in Programming
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
110
net-httpのHTTP/2対応について
naruse
0
440
Inside Stream API
skrb
1
640
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
720
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
1.6k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
190
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
430
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
Webフレームワークの ベンチマークについて
yusukebe
0
120
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1k
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.3k
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
550
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
570
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.6k
We Have a Design System, Now What?
morganepeng
55
8.2k
Transcript
<< 自作AIを Androidにのっける
岡山大学工学部 24卒 自称Androidエンジニア 趣味:刀鑑賞、麻雀、プログラミング @bugdog24 オキリョウ
最近AI流行ってますよね
None
APIまで公開されていて 簡単にアプリに組み込める!
なかなかサーバーに 繋がらないときも・・・
アプリリリースするときに こうなるの怖い😱
そもそも既存のAI叩いても 面白くない
せっかくなら自作AI 載せてやりたい!
そんなあなたに
None
1 TF Liteとは
モバイル端末上で AIを動かせるライブラリ
様々な端末上で動作可能 ・Android ・iOS ・Raspberry Pi ・etc…
TF Liteの利点 ネットで調達するもよし、自分 で作成するもよし AIの カスタマイズ性 端末で実行するため、AIを動か すサーバーを用意する必要がな い サーバーレス
2 簡単な使い方
1. AIモデルを用意 2. ライブラリ追加 3. プロジェクトに入れる 4. 使う
1. AIモデルを用意
Tensor FlowでAIモデル作成 or 配布されてるAIモデルを 再トレーニング(転移学習)
2. ライブラリ追加
依存関係を足すだけ
3. プロジェクトに入れる
実はAndroid Studioに オプションが存在する
None
None
4. 使う
None
None
簡単👍
3 アプリ作る
None
AIモデルを用意
今回はColaboratoryで 1から作成する
構造を決める
学習
評価
評価
SavedModel形式で保存
tflite形式に変換
変換したモデルの評価
変換したモデルの評価
アプリ部分を作る
None
作る機能 - 手書き入力機能 - AIと通信する機能
手書き入力機能 ライブラリがないため 自力で実装
AIと通信する機能 Repositoryパターンで対応
None
None
AIモデルの導入
None
None
None
インスタンスはDIして シングルトンで持つ
None
None
None
None
None
None
アプリ完成🎉
4 感想
・AI作るの楽しい ・どこでも利用可能 ・ストレスを感じない速さ
・アプリとの接続が面倒 ・モデルサイズがでかい -> 37.5MB / 48.11MB
None
None
・アプリとの接続が面倒 ・モデルサイズがでかい -> 37.5MB / 48.11MB
結論 なんやかんや面白かった
ぜひお試しあれ
ご清聴 ありがとうございました!