Skip to content

Examples: vision and tflite simpletests - #194

Merged
bdbarnett merged 1 commit into
mainfrom
examples/vision-tflite
Oct 28, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
examples/vision-tflite

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

Two small examples for the opt-in modules, one thing each.

vision_simpletest.py draws a red rectangle and a blue circle with the image module, finds the red one with find_blobs, prints where it is, and saves the picture as a JPEG. It needs no camera or display.

tflite_simpletest.py loads esp-vision's sine model and prints its prediction beside math.sin at eight points over one cycle, scaling each value into and out of the model's 8-bit units.

Both ran on a Waveshare ESP32-P4-WIFI6-Touch-LCD-4B on MicroPython 1.30 preview, with a firmware built with vision and tflite. find_blobs reported the rectangle exactly where it was drawn, the saved JPEG shows both shapes, and the model stayed within about 0.1 of math.sin.

vision draws two shapes and finds the red one with find_blobs; tflite runs
esp-vision's sine model and compares it with math.sin.
@bdbarnett
bdbarnett merged commit 543365a into main Oct 28, 2026
3 checks passed
@bdbarnett
bdbarnett deleted the examples/vision-tflite branch October 28, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant