LiteRT for Microcontrollers est conçu pour exécuter des modèles de machine learning
sur des microcontrôleurs et d'autres appareils
avec seulement quelques kilo-octets de mémoire. La
l'environnement d'exécution principal ne prend que 16 Ko sur un appareil Arm Cortex M3 et peut exécuter de nombreuses
des modèles de ML. Il ne nécessite aucune compatibilité avec le système d'exploitation, ni aucune norme C ou C++
ou l'allocation de mémoire dynamique.
Pourquoi les microcontrôleurs sont-ils importants ?
Les microcontrôleurs sont généralement de petits
appareils informatiques à faible puissance qui sont
intégrés dans du matériel qui
nécessite des calculs de base. En recourant au machine learning
de minuscules microcontrôleurs, nous pouvons renforcer l'intelligence de milliards de
les appareils que nous utilisons dans notre vie, y compris les appareils électroménagers et
Appareils Things, sans matériel coûteux ni Internet fiable
qui est souvent soumise à des contraintes de bande passante et d'alimentation
entraîne une latence élevée. Cela peut également contribuer à préserver
la confidentialité, puisqu'aucune donnée
quitte l'appareil. Imaginez des appareils électroménagers intelligents capables de s'adapter à votre
des capteurs industriels intelligents et de routine qui comprennent la différence entre
les problèmes et le fonctionnement normal, et des jouets magiques pour apprendre en s'amusant
et de manière agréable.
Plates-formes compatibles
LiteRT for Microcontrollers est écrit en C++ 17 et nécessite
Google Cloud. Il a été testé de manière approfondie avec de
nombreux processeurs basés sur la
Série Arm Cortex-M
et a été porté sur d'autres architectures, y compris
ESP32 La
est disponible sous forme
de bibliothèque Arduino. Il peut également générer des projets
tels que Mbed. Il s'agit d'un outil Open Source qui peut être inclus
n'importe quel projet C++ 17.
Les cartes de développement suivantes sont prises en charge:
Chaque exemple d'application est
GitHub
et contient un fichier README.md qui explique comment le déployer sur
plates-formes. Certains exemples incluent également des tutoriels de bout en bout à l'aide d'une méthode
plate-forme, comme indiqué ci-dessous:
Bonjour
Montre les principes de base de l'utilisation de LiteRT pour
Microcontrôleurs
<ph type="x-smartling-placeholder">
Convertir en tableau d'octets C avec
outils standards pour les stocker
de la mémoire du programme
en lecture seule sur l'appareil.
Exécuter une inférence sur l'appareil à l'aide de la bibliothèque C++ et du processus
les résultats.
Limites
LiteRT for Microcontrollers est conçu pour répondre aux contraintes spécifiques
développement de microcontrôleurs. Si vous travaillez sur des appareils plus puissants (par exemple,
exemple, un appareil Linux intégré comme le Raspberry Pi), la norme
Le framework LiteRT peut être plus facile à intégrer.
Les limites suivantes doivent être prises en compte:
Créez et convertissez des modèles pour en savoir plus sur l'entraînement.
et la conversion de modèles à déployer
sur des microcontrôleurs.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/24 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/24 (UTC)."],[],[],null,["# LiteRT for Microcontrollers is designed to run machine learning models\non microcontrollers and other devices with only a few kilobytes of memory. The\ncore runtime just fits in 16 KB on an Arm Cortex M3 and can run many basic\nmodels. It doesn't require operating system support, any standard C or C++\nlibraries, or dynamic memory allocation.\n| **Note:** The [LiteRT for Microcontrollers Experiments](https://experiments.withgoogle.com/collection/tfliteformicrocontrollers) features work by developers combining Arduino and TensorFlow to create awesome experiences and tools. Check out the site for inspiration to create your own TinyML projects.\n\nWhy microcontrollers are important\n----------------------------------\n\nMicrocontrollers are typically small, low-powered computing devices that are\nembedded within hardware that requires basic computation. By bringing machine\nlearning to tiny microcontrollers, we can boost the intelligence of billions of\ndevices that we use in our lives, including household appliances and Internet of\nThings devices, without relying on expensive hardware or reliable internet\nconnections, which is often subject to bandwidth and power constraints and\nresults in high latency. This can also help preserve privacy, since no data\nleaves the device. Imagine smart appliances that can adapt to your daily\nroutine, intelligent industrial sensors that understand the difference between\nproblems and normal operation, and magical toys that can help kids learn in fun\nand delightful ways.\n\nSupported platforms\n-------------------\n\nLiteRT for Microcontrollers is written in C++ 17 and requires a 32-bit\nplatform. It has been tested extensively with many processors based on the\n[Arm Cortex-M Series](https://developer.arm.com/ip-products/processors/cortex-m)\narchitecture, and has been ported to other architectures including\n[ESP32](https://www.espressif.com/en/products/hardware/esp32/overview). The\nframework is available as an Arduino library. It can also generate projects for\ndevelopment environments such as Mbed. It is open source and can be included in\nany C++ 17 project.\n\nThe following development boards are supported:\n\n- [Arduino Nano 33 BLE Sense](https://store-usa.arduino.cc/products/arduino-nano-33-ble-sense-with-headers)\n- [SparkFun Edge](https://www.sparkfun.com/products/15170)\n- [STM32F746 Discovery kit](https://www.st.com/en/evaluation-tools/32f746gdiscovery.html)\n- [Adafruit EdgeBadge](https://www.adafruit.com/product/4400)\n- [Adafruit LiteRT for Microcontrollers Kit](https://www.adafruit.com/product/4317)\n- [Adafruit Circuit Playground Bluefruit](https://learn.adafruit.com/tensorflow-lite-for-circuit-playground-bluefruit-quickstart?view=all)\n- [Espressif ESP32-DevKitC](https://www.espressif.com/en/products/hardware/esp32-devkitc/overview)\n- [Espressif ESP-EYE](https://www.espressif.com/en/products/hardware/esp-eye/overview)\n- [Wio Terminal: ATSAMD51](https://www.seeedstudio.com/Wio-Terminal-p-4509.html)\n- [Himax WE-I Plus EVB Endpoint AI Development Board](https://www.sparkfun.com/products/17256)\n- [Synopsys DesignWare ARC EM Software Development Platform](https://www.synopsys.com/dw/ipdir.php?ds=arc-em-software-development-platform)\n- [Sony Spresense](https://developer.sony.com/develop/spresense/)\n\nExplore the examples\n--------------------\n\nEach example application is on\n[GitHub](https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/examples)\nand has a `README.md` file that explains how it can be deployed to its supported\nplatforms. Some examples also have end-to-end tutorials using a specific\nplatform, as given below:\n\n- [Hello World](https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/examples/hello_world) - Demonstrates the absolute basics of using LiteRT for Microcontrollers\n - [Tutorial using any supported device](./get_started)\n- [Micro speech](https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/examples/micro_speech) - Captures audio with a microphone to detect the words \"yes\" and \"no\"\n - [Tutorial using SparkFun Edge](https://codelabs.developers.google.com/codelabs/sparkfun-tensorflow/#0)\n- [Person detection](https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/examples/person_detection) - Captures camera data with an image sensor to detect the presence or absence of a person\n\nWorkflow\n--------\n\nThe following steps are required to deploy and run a TensorFlow model on a\nmicrocontroller:\n\n1. **Train a model** :\n - *Generate a small TensorFlow model* that can fit your target device and contains [supported operations](./build_convert#operation_support).\n - *Convert to a LiteRT model* using the [LiteRT converter](./build_convert#model_conversion).\n - *Convert to a C byte array* using [standard tools](./build_convert#convert_to_a_c_array) to store it in a read-only program memory on device.\n2. **Run inference** on device using the [C++ library](./library) and process the results.\n\nLimitations\n-----------\n\nLiteRT for Microcontrollers is designed for the specific constraints of\nmicrocontroller development. If you are working on more powerful devices (for\nexample, an embedded Linux device like the Raspberry Pi), the standard\nLiteRT framework might be easier to integrate.\n\nThe following limitations should be considered:\n\n- Support for a [limited subset](./build_convert#operation_support) of TensorFlow operations\n- Support for a limited set of devices\n- Low-level C++ API requiring manual memory management\n- On device training is not supported\n\nNext steps\n----------\n\n- [Get started with microcontrollers](./get_started) to try the example application and learn how to use the API.\n- [Understand the C++ library](./library) to learn how to use the library in your own project.\n- [Build and convert models](./build_convert) to learn more about training and converting models for deployment on microcontrollers."]]