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
【Python東海#44】Pydroid3で画像処理
Search
高橋かずひと
November 18, 2023
Technology
0
1.6k
【Python東海#44】Pydroid3で画像処理
スライド内では動画を多用しているため、動画を確認したい方はYouTubeでの視聴を推奨しています。
YouTube:
https://youtu.be/Od0POpMRpQk
高橋かずひと
November 18, 2023
Tweet
Share
More Decks by 高橋かずひと
See All by 高橋かずひと
【NGK2025S】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
0
810
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
1.6k
【Unagi.py 56枚目】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
1
1.6k
【Python東海#43】Image-Processing-Node-Editor
kazuhitotakahashi
0
1k
【MLN】Visual Blocks for ML
kazuhitotakahashi
0
1.3k
【NGK2023S】 ノードエディタ形式の画像処理ツール「Image-Processing-Node-Editor」
kazuhitotakahashi
0
1.3k
【Pythonデータ分析勉強会#33】「DearPyGuiに入門しました」の続き~Image-Processing-Node-Editor~
kazuhitotakahashi
0
1.4k
【OSC2022Nagoya】DearPyGuiに入門しました / OSC2022Nagoya Introduced to DearPyGui
kazuhitotakahashi
1
1.8k
【Pythonデータ分析勉強会#32】Raspberry Piでリアルタイムな物体検出(2022年4月やったやつ)
kazuhitotakahashi
0
2.1k
Other Decks in Technology
See All in Technology
データ資産をシームレスに伝達するためのイベント駆動型アーキテクチャ
kakehashi
PRO
2
530
リアルタイム分析データベースで実現する SQLベースのオブザーバビリティ
mikimatsumoto
0
1.3k
データマネジメントのトレードオフに立ち向かう
ikkimiyazaki
6
960
Moved to https://speakerdeck.com/toshihue/presales-engineer-career-bridging-tech-biz-ja
toshihue
2
740
PHPカンファレンス名古屋-テックリードの経験から学んだ設計の教訓
hayatokudou
2
260
偶然 × 行動で人生の可能性を広げよう / Serendipity × Action: Discover Your Possibilities
ar_tama
1
1.1k
「海外登壇」という 選択肢を与えるために 〜Gophers EX
logica0419
0
700
『衛星データ利用の方々にとって近いようで触れる機会のなさそうな小話 ~ 衛星搭載ソフトウェアと衛星運用ソフトウェア (実物) を動かしながらわいわいする編 ~』 @日本衛星データコミニティ勉強会
meltingrabbit
0
140
速くて安いWebサイトを作る
nishiharatsubasa
10
12k
Building Products in the LLM Era
ymatsuwitter
10
5.4k
プロダクトエンジニア構想を立ち上げ、プロダクト志向な組織への成長を続けている話 / grow into a product-oriented organization
hiro_torii
1
170
RECRUIT TECH CONFERENCE 2025 プレイベント【高橋】
recruitengineers
PRO
0
160
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Designing for humans not robots
tammielis
250
25k
Done Done
chrislema
182
16k
GraphQLとの向き合い方2022年版
quramy
44
13k
Unsuck your backbone
ammeep
669
57k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Writing Fast Ruby
sferik
628
61k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
Side Projects
sachag
452
42k
How to train your dragon (web standard)
notwaldorf
91
5.8k
Transcript
Pydroid 3 で画像処理 Python東海 #44 2023/11/18
2 Who am I ? Name Twitter :KzhtTkhs :高橋かずひと Work
:画像処理 兼 なんでも屋 Other :Axross寄稿や インディーゲーム開発の お手伝いしています
3 Who am I ? Name Twitter :KzhtTkhs :高橋かずひと Work
:画像処理 兼 なんでも屋 Other : Axross寄稿や インディーゲーム開発の お手伝いしています
What is Pydroid 3? 4
5 Pydroid3とは Pydroid 3は、Android向けの 最も使いやすく強力な教育用 Python 3 IDE ※「最も使いやすく」と「強力な」は公式の自称 有料💴
※2023年8月購入時は日本円で1850円の買い切りアプリ
6 Pydroid3の特徴
7 Pydroid3 Loaded with modern educational libraries and assets “最新の教育ラ
イブラリとアセ ットが満載”
8 Interactive terminal mode for both casual and advanced usage
“カジュアルで も高度でも使用 できる対話型タ ーミナル”
9 Multiple graphical interface libaries support “複数の視覚的 なインターフェ イス ライブラ
リのサポート”
10 Custom pip repository if bundled C compiler is not
fast enough “バンドルCでは十分 に動作しないパッケ ージのカスタムpipリ ポジトリ”
11 Code completion and error checking(premium feature) “コード補完とエラ ーチェック (プレミアム機能)”
12 Native matplotlib support with Tkinter and PyQt5 “Tkinter と
PyQt5 によるネイ ティブ matplotlib サポート”
13 Use your phone sensors with Kivy and Qt “Kivy
と Qt 上で スマートフォンの センサーを利用で きる”
14 Pydroid3を画像処理に使う 「QUICK INSTALL」に用意されて いる画像処理に使えるパッケージ ・OpenCV ・Pillow ・NumPy ・PyTorch ・TensorFlow
など
15 Pydroid3を画像処理に使う その他のパッケージは「INSTALL」 からインストールできるが、 CPUアーキテクチャに依存するよう なパッケージは「QUICK INSTALL」にあるものしか使用でき ない ONNX Runtimeが使えないのは残念。。。
16 Pydroid3を画像処理に使う 表示に関わる処理は、 Tkinter や QTを 使わなければならない ため、OpenCVで作 るような簡易なサンプ ルを動かす場合は注意
右図はTkinter利用例 # TK用にチャンネルをRGBに変更 rgb_image = cv2.cvtColor(debug_image, cv2.COLOR_BGR2RGB) # 表示向き補正 label_width = label.winfo_screenwidth() label_height = label.winfo_screenheight() image_width = rgb_image.shape[0] image_height = rgb_image.shape[1] image_width, image_height = image_height, image_width # TKのラベル更新 img = Image.fromarray(rgb_image) imgtk = ImageTk.PhotoImage(image=img) label.configure(image=imgtk) label.update() label.after(0, label_loop) cv2.imshow(“Sample", debug_image) cv2.waitKey(100)
17 Pydroid3:サンプル① OpenCVを用いたカメラ制御 ・カメラ入力 ・オートフォーカス制御 ・露出制御 ・ライト など
18 Pydroid3:サンプル② OpenCVでアスキーカメラ
19 Pydroid3:サンプル③ PyTorchを用いたクラス分類 ・MobileNet v2
20 Pydroid3:実演デモ TensorFlow Lite を用いた物体検出 ほぼチューニング無しでGoogle Pixel Foldで約10fps (見た感じ、おそらく、CPU推論) ・YOLOX-Nano
21 こんな人に向いているかも 画像処理やAIのスマホプロトタイプをサッと動かしたい人 ・画像処理(特にAI関連)は、基本的にPython ・Androidアプリは、基本的にはJAVA or Kotlin → Pythonでサッと作って、ちょっとスマホで試したい と言う場合に、JAVAに書き換える作業は正直面倒。。。
ご清聴ありがとうございました🙂