How aioscout/google-teachable-machine-tflite-model-training works
This repository combines an ESP32-P4 camera capture and Teachable Machine upload workflow with a separate on-device inference/control path. The documented training flow is camera frames over serial to a Processing preview/bridge, then WebSockets to Teachable Machine. The inference sketch, camera PoC, and training platform are described in the README but their implementation was not sampled, so their internal wiring is shown only where documentation supports it.
Main entry points: TFLite Camera inference and saving · S3_UART_Receiver.ino S3 inference receiver · TM_Connector.pde Serial preview bridge · ESP32-P4-IMX219-PoC P4 camera PoC
Components 17
Capture and training
- P4 camera PoC
ESP32-P4-IMX219-PoC - Serial preview bridge
TMConnector/TM_Connector/TM_Connector.pde - Local training platform
AItraining - Camera image provider
TMUploader/TM_Uploader/ImageProvider.cpp
Inference and control
- Camera inference and saving
TFLite - S3 inference receiver
S3_UART_Receiver/S3_UART_Receiver.ino - Labels and class types
S3_UART_Receiver/model_settings.cpp - Image and crop interface
S3_UART_Receiver/image_provider.h
Frame storage
- SD_MMC test
SDReader/SDReader.ino - FFat export and clean
FFatReader/FFatReader.ino - Serial file receiver
FFatReader/export_ffat.py
Device platform
- Customized Arduino core
arduino
Other components
- Operator
- IMX219 camera
- Teachable Machine
- MicroSD storage
- FFat storage
Connections 18
- IMX219 camera → P4 camera PoC: captures frames
- P4 camera PoC → Serial preview bridge: sends serial frames
- Serial preview bridge → Teachable Machine: forwards via WebSockets
- Operator → Serial preview bridge: selects serial port
- Operator → Teachable Machine: starts training
- Operator → Local training platform: uses platform
- IMX219 camera → Camera image provider: provides frames
- IMX219 camera → Camera inference and saving: supplies images
- Camera inference and saving → S3 inference receiver: sends inference packets
- S3 inference receiver → Camera inference and saving: sends control commands
- S3 inference receiver → Labels and class types: uses labels and types
- Camera inference and saving → Image and crop interface: uses image interface
- Camera inference and saving → MicroSD storage: writes frames
- Camera inference and saving → FFat storage: writes frames
- SD_MMC test → MicroSD storage: tests access
- FFat export and clean → FFat storage: exports or cleans
- Serial file receiver → FFat export and clean: requests and receives files
- Customized Arduino core → Camera inference and saving: provides camera support