分類: TensorFlow
TensorFlow模型應用於裝置 (含TensorFlow Lite)
Edge Impulse解決方案之Recognize sounds from audio教學實作
接續前面文章,接下來進行Recognize sounds from audio教學實作,請同時參閱官方教學文章。本文為了方便說明,就直接使用Running faucet預建資料集,若想自行製作資料集就請參考官方教學文章之說明。首先,下載資料集並解壓縮,使用以下命令將資料集上傳至Edge Impulse平台:
» Read moreEdge Impulse解決方案之Continuous motion recognition教學實作
接續前面文章,接下來進行Continuous motion recognition教學實作,過程中請同步閱讀官方教學文章。本文為了方便說明,就直接使用Prebuilt dataset : Continuous gestures資料集,若想自行製作資料集請參考官方教學文章之說明。首先,下載資料集並解壓縮,在Node.js command prompt中使用以下命令將資料集上傳至Edge Impulse平台:
» Read moreTensorFlow Lite for Microcontrollers的Micro speech example實作
接續前面文章與環境設定,進行TensorFlow Lite for Microcontrollers的Micro speech example實作。這個實作對應SparkFun Edge、STM32F7 discovery kit與Arduino Nano 33 BLE Sense三塊開發板,SparkFun Edge與STM32F7 discovery kit開發板的實作環境在Ubuntu 16.04 64bits Linux,Arduino Nano 33 BLE Sense開發板的實作環境在Windows 7 64bits上。另外,請參照閱讀TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers一書的第7章與第8章,以瞭解程式碼的細節與範例運作方式。首先,進行SparkFun Edge開發板的實作;在tensorflow原始碼的目錄下,先進入SparkFun編譯的Python虛擬環境:
» Read moreTensorFlow Lite for Microcontrollers的Person detection example實作
接續前面文章與環境設定,進行TensorFlow Lite for Microcontrollers的Person detection example實作。這個實作只對應SparkFun Edge與Arduino Nano 33 BLE Sense兩塊開發板,SparkFun Edge開發板的實作環境在Ubuntu 16.04 64bits Linux,Arduino Nano 33 BLE Sense開發板的實作環境在Windows 7 64bits上。另外,請參照閱讀TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers一書的第9章與第10章,以瞭解程式碼的細節與範例運作方式。首先,進行SparkFun Edge開發板的實作;在tensorflow原始碼的目錄下,先進入SparkFun編譯的Python虛擬環境:
» Read moreTensorFlow Lite for Microcontrollers的Magic wand example實作
接續前面文章與環境設定,進行TensorFlow Lite for Microcontrollers的Magic wand example實作。這個實作只對應SparkFun Edge與Arduino Nano 33 BLE Sense兩塊開發板,SparkFun Edge開發板的實作環境在Ubuntu 16.04 64bits Linux,Arduino Nano 33 BLE Sense開發板的實作環境在Windows 7 64bits上。另外,請參照閱讀TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers一書的第11章與第12章,以瞭解程式碼的細節。首先,進行SparkFun Edge開發板的實作;在tensorflow原始碼的目錄下,先進入SparkFun編譯的Python虛擬環境:
» Read moreTinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers一書初步閱讀心得
在Hatch One與Linkit 7697上執行TensorFlow Lite for Microcontrollers的Hello World example
本次說明”非官方”的Arduino開發板如何執行TensorFlow Lite for Microcontrollers的Hello World example。一樣是在Windows7 64Bits上進行驗證。程式庫安裝與使用請參閱前面的文章,注意需選擇非” precompiled”的版本。首先介紹Linkit 7697開發板的Arduino部份,先將相關軟體元件安裝起來:
» Read more於Arduino上執行TensorFlow Lite for Microcontrollers的Hello World example
接續前文,本文說明在Arduino上執行TensorFlow Lite for Microcontrollers的Hello World example;舊的版本與相關設定請參考之前文章。本次使用的開發板為Arduino MKRZERO與Arduino Nano 33 BLE Sense,開發環境則是Windows 7 64Bits。首先下載並安裝Arduino IDE,安裝完後先點選選單上的”管理程式庫”:
» Read moreTensorFlow Lite for Microcontrollers的Hello World example編譯與執行
延續前面的文章,接下來都是以” Moved TensorFlow Lite Micro out of experimental folder”的原始碼架構來說明如何編譯TensorFlow Lite for Microcontrollers的Hello World example。本次說明並不包含Arduino的部份,因其是使用官方的Arduino_TensorFlowLite程式庫,會用另外一篇文章進行說明。本文都是在Ubuntu 16.04.6 LTS (Xenial Xerus) 64-bit PC (AMD64) desktop系統上進行,並使用Anaconda Distributionx的虛擬環境來管理不同Microcontroller之編譯環境(除了ESP-IDF必需安裝到Ubuntu原生環境外)。首先,先安裝SparkFun Serial Basic Breakout所需使用的USB Serial Port驅動程式,修改/etc/modprobe.d/blacklist.conf加入這一行:
» Read more