This data pipline demonstrates how to route any sensor data to Google’s Teachable Machines to train a tiny Tensorflow Model to be run on the ESP itself!
Check out the very helpful Tutorial from the Teachable Machine community to pipe camera data.
I used a straightforward connection via OSC to send raw sensor data to a Processing sketch, which generates on suitable image for teachable machine.
https://www.hackster.io/aslamahrahiman/deep-reinforcement-learning-on-esp32-843928