Skip to content

examples: Fix TensorFlow segmentation example#1371

Open
davidplowman wants to merge 1 commit intoraspberrypi:nextfrom
davidplowman:segmentation-fix
Open

examples: Fix TensorFlow segmentation example#1371
davidplowman wants to merge 1 commit intoraspberrypi:nextfrom
davidplowman:segmentation-fix

Conversation

@davidplowman
Copy link
Copy Markdown
Collaborator

Can't save PIL rgbx images as PNG any more. Just avoid the PIL image completely.

@davidplowman davidplowman force-pushed the segmentation-fix branch 2 times, most recently from b1050fc to 5389b75 Compare March 26, 2026 13:32
A few fixes and tidies:

* Can't save PIL rgbx images as PNG any more. Just avoid the PIL image
  completely.

* Don't reload the network and files for every inference.

* Convert YUV420, not greyscale, to RGB.

* Avoid resizing the low res image for no reason (though the odd-sized
input to the model makes this slightly irritating)

* Show how to request an RGB image directly on a Pi 5.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant