งานหลาย ๆ งาน มีความต้องการใช้งานโมเดล Machine Learning บนอุปกรณ์ Edge ของ Network แทนที่จะต้องเสียเวลา ส่งข้อมูลไป-กลับระหว่าง Server เราสามารถแปลงโมเดลเป็น TensorFlow Lite ให้ไปรันบนมือถือ และอุปกรณ์ Edge ได้เลย

TensorFlow Lite (TFLite) คืออะไร

How TensorFlow Lite Works - Pick a model, Convert, Deploy, Optimize. Credit https://www.tensorflow.org/lite
How TensorFlow Lite Works – Pick a model, Convert, Deploy, Optimize. Credit https://www.tensorflow.org/lite

TensorFlow Lite (TFLite) คือ Tools ที่ช่วยให้นักพัฒนาสามารถรันโมเดล TensorFlow ทำ Inference บนมือถือ Mobile, Android, iOS, อุปกรณ์ Edge, IoT Device, Raspberry Pi, Jetson Nano, Arduino, Embedded, Microcontroller, Etc. ได้ ด้วยโมเดลที่มีขนาดเล็กลง ทำงานได้เร็วขึ้น ลด Latency โดยอาจจะลดความแม่นยำลงไปบ้าง

Coral’s first products are powered by Google’s Edge TPU chip, and are purpose-built to run TensorFlow Lite, Credit https://blog.tensorflow.org/2019/03/build-ai-that-works-offline-with-coral.html
Coral’s first products are powered by Google’s Edge TPU chip, and are purpose-built to run TensorFlow Lite, Credit https://blog.tensorflow.org/2019/03/build-ai-that-works-offline-with-coral.html

TensorFlow Lite ประกอบด้วย 2 ส่วนดังนี้

  • TensorFlow Lite Interpreter เป็นตัวรันโมเดลที่ถูกแปลง และ Optimize มาเป็นพิเศษ บน Hardware ที่กำหนด เช่น มือถือ, Embedded Linux และ Microcontroller
  • TensorFlow Lite Converter เป็นตัวแปลงโมเดล TensorFlow ไปเป็นโมเดลขนาดเล็ก ที่ทำงานได้รวดเร็ว สำหรับรันกับ Interpreter

ข้อดีของการใช้ Machine Learning บน อุปกรณ์ Edge

Personal Health Apps for Smartphones. Credit https://commons.wikimedia.org/wiki/File:Personal_Health_Apps_for_Smartphones.jpg
Personal Health Apps for Smartphones. Credit https://commons.wikimedia.org/wiki/File:Personal_Health_Apps_for_Smartphones.jpg
  • Latency ตอบสนองทันที่ ไม่ต้องส่งข้อมูลไปกลับข้ามเน็ตเวิร์ค
  • Privacy ข้อมูลไม่ต้องออกจากอุปกรณ์
  • Connectivity ไม่ต้องใช้อินเตอร์เน็ต ติดต่อ Server
  • Power Consumption เมื่อไม่ใช้เน็ตเวิร์คก็ประหยัดพลังงาน

เรามาเริ่มกันเลยดีกว่า

Open In Colab

แชร์ให้เพื่อน:

Surapong Kanoktipsatharporn on FacebookSurapong Kanoktipsatharporn on LinkedinSurapong Kanoktipsatharporn on Rss
Surapong Kanoktipsatharporn
Solutions Architect at Bua Labs
The ultimate test of your knowledge is your capacity to convey it to another.

Published by Surapong Kanoktipsatharporn

The ultimate test of your knowledge is your capacity to convey it to another.