Upgrade to Pro — share decks privately, control downloads, hide ads and more …

EdgeTPUを使ってみよう

clouddev-code
September 26, 2023
12

 EdgeTPUを使ってみよう

clouddev-code

September 26, 2023
Tweet

Transcript

  1. AGENDA 2 1 2 3 4 Edge Computing て。 Edge

    Computingとは EdgeTPUて?Network Edgeとかいろいろある が。 EdgeTPU 手軽なところでRaspberry PiでEdgeTPUが使え ます Raspberry Piで試そう まとめ
  2. About Us My work • cloud DevOps architecture construction. Interesting

    • BigQuery and google Dataflow. • Data Loss Prevention • Cloud Endpoints 3 s.hiruta @web_se URL:https://www.totalsolution.biz Soushi Hiruta +αの連携機能。
  3. Cloud Data Loss Prevention 4 Cloud Functions Name BigQuery Cloud

    Pub/Sub gcloud pubsub topic publish -message ‘test 2 is [email protected]
  4. Edge Computingとは 7 1 2 AWS Lambda/Edge、Cloudflare Workers Network Edge

    Edge TPU、Inflerence edge、AWS IoT Greengrass IoT Edge
  5. IoT Edge 8 1 2 IoT edge CPUは低スペック。e,x, Raspberry Pi、Arduino

    Microcontrollers use for less power than CPUs RAMもPC、サーバほど積まれていない。 Only tens of kiobytes of RAM 2 ネットワークに接続されていないケースがある No Cloud Connections
  6. USB Acceleratorsのお話 11 1 2 USB 3.0に対応していると、よりパフォーマンスが出る。 USB3.0 Type-C socket

    Debian 系に対応 Debian 6.0 or higher, or any derivative thereof ( such as Ubuntu 10.0+) 2 設定次第でパフォーマンスがあげることができる。ただし、熱をもつとも記載あり default or maximum clock frequency https://www.youtube.com/watch?v=CukaWaWbBHY&t=849s Raspberry Pi USB2.0なので、ここがボトルネックになるか と。 DetectWithImage 0.28248214599989296 sec  ※mobilenet_ssd_v2_coco_quant_postpr ocess_edgetpu.tfliteモデル ClassifyWithImage 1.3688266489998568 sec ※inception_v4_299_quant_edgetpu.tflit eモデル
  7. OpenCV構築 15 Raspbian 9.4 ( Stretch / Debian 9.0) 4.14.79-v7+

    https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html • Raspbian公式サイトで公開されているものなら、ビル ドは問題なく可 • ビルドに時間がかかる。ネットの情報によりと、途中 でビルドが止まる場合あり
  8. Modelの作成 16 (Retrain an image classification model on-device) python3 demo/classification_transfer_learning.py

    \ --extractor ${DEMO_DIR}/mobilenet_v1_1.0_224_quant_embedding_extractor_edgetpu.tflite \ --data ${DEMO_DIR}/flower_photos \ --output ${DEMO_DIR}/flower_model.tflite \ --test_ratio 0.95 データセットの中でどのくらいの画像を test datasetとして使うか割合を指定 embedding extractor (this is a version of the CNN network without the final fully-connected layer that's pretrained on ImageNet) https://coral.withgoogle.com/tutorials/edgetpu-retrain-classification-ondevice/
  9. イメージの分類 18 Getting Started : https://coral.withgoogle.com/tutorials/accelerator/ python3 demo/classify_image.py \ --model

    test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \ --label test_data/inat_bird_labels.txt \ --image test_data/parrot.jpg