M5Stack Timer Camera Xで作るAI自動点灯ライト【手を自動認識】

© CC BY 4+ visibility1809
© CC BY 4+
visibility1809

手を認識すると自動で点灯/消灯するLEDライトです。
Automatically turns on and off when it recognizes hand.

link https://github.com/mongonta0716/esp-who/tree/add_handpose_estimation_web_with_led
動画
開発素材
システム構成
system image

用意するもの

用意するものはM5Stack TimerCameraXとLEDテープのみです。LEDテープに付属するGroveケーブルで接続します。

改変元

esp-whoのexamplesにあるhandpose_estimation_webを改変して実現しました。handpose_estimation_webはブラウザ経由で動画を確認しながら手の検出を行うサンプルで、実際に稼働させるときはhand_detection_with_command_lineを改変した方が楽だと思います。

使用した環境

  • Ubuntsu 20.04
  • esp-idf v4.4
  • esp-who
    examples/single-chip/handpose_estimation_webを改変しました。
  • FastLED-idf
    componentsを利用しています。

ビルドするまでの簡単な手順

esp-whoのサンプル(handpose_estimation_web)をビルドする手順です。(LEDと連携はしません。)

  1. esp-idfをセットアップし、idf.pyを実行できる環境を作ります。
  2. esp-whoをgit cloneします。※ add_handpose_estimation_web_with_ledブランチです。
    git clone https://github.com/mongonta0716/esp-who/tree/add_handpose_estimation_web_with_led
  3. サブモジュールをupdateします。
    cd esp-who
    git submodule update --init --recursive
  4. esp-who/examples/single-chip/handpose_estimation_web_with_led に移動します。
  5. idf.py menuconfig を実行し、「Camera Web Server」の下記の項目を設定します
  • WiFi Settings

    • Camera Host Name
      任意のホスト名<例、m5camera>

    • WiFi STA SSID

    • WiFi STA Password

  • Camera Pinout

    • M5Stack Camera With PSRAM
  • [*]ESP-WHO Hand Detection

  • [*] ESP-WHO Hand Pose Estimation

  1. M5TimerCameraXをPCに接続し、 idf.py -p /dev/ttyUSB0 -b 1500000 flash monitor を実行します。

  2. 起動するとIPアドレスがシリアルモニターに表示されるのでブラウザで開くと操作ができるようになります。

  3. Resolution - QVGA(320x240)を選択

  4. Hand DetectonをON

  5. 「Start Stream」をクリックするとストリーミングが開始され手を認識できるようになります。

注意事項

FastLEDとカメラが干渉するらしく、不定期でストリーミングが停止してしまう不具合があります。粘ったのですが、現象を回避できませんでした。実際に使う場合はhand_detection_with_command_lineを改変した方がいいと思います。

ストーリー

esp-whoというプロジェクトをTwitterで知り、ESP32単体でも顔認識や手を認識するということができることが分かりました。

実際に試してみたところ顔の検出はあまり精度が良くなかったのですが、手を検出する精度はかなり良かったので便利だなと思いLEDテープと組み合わせて自動点灯ライトを作ってみました。

「着席/離席を自動で検出したいと思っているけど、カメラで自分を常時撮影することは抵抗がある。」という方にはぴったりのソリューションだと思います。

今回は分かりやすくするためにLEDテープと連携していますが、ESP32を利用してWiFi通信で他のM5Stackシリーズとの連携を行ったり、BLEキーボードデバイスとしてPCと連携したり様々な応用が考えられます。

I found out about the esp-who project on Twitter, and learned that the ESP32 alone is capable of recognizing faces and hands. When I tried it out, I found that the accuracy of face detection was not very good, but the accuracy of hand detection was pretty good, so I thought it would be useful to combine it with LED tape to make an automatic lighting light.

This is a great solution for people who want to automatically detect when someone is seated or unseated, but don't want to constantly capture themselves with a camera.

For the sake of clarity, we have linked it with LED tape, but it can be applied in various ways, such as linking with other M5Stack series via WiFi using ESP32, or linking with a PC as a BLE keyboard device.

メンバー
  • user
    紅樹 タカオ @mongonta555
    • リーダー兼開発者

関連イベント
  • event M5Stack Japan Creativity Contest 20212021-07-15 開催
関連リンク

同じニオイがする作品
  • event 陣痛共有デバイス「Happy Pain」
  • event オンラインライブをぶち上げる「LIVEHOME」 「LIVEHOME」will blast off
  • event 歩行リハビリエンタメシステム Melody Shoes
  • event デジタルなルービックキューブ

Proto lovers ♥
user
user

イベントまとめ

コンテストまとめ

作品を登録しよう

モノづくりしている人に、つくった作品を見てもらえ、リアクションがもらえるかも?

close

目次


Proto lovers ♥
user
user