ricardodeazambuja / Maple-Syrup-Pi-Camera

Low power smart camera (3D printed) based on the Raspberry Pi Zero W and Google Coral EdgeTPU
Apache License 2.0
68 stars 5 forks source link

Notebooks using TensorFlow Lite Model Maker are broken! #2

Closed ricardodeazambuja closed 1 year ago

ricardodeazambuja commented 2 years ago

Thanks to an update and a bad requirement, tflite-model-maker requires flatbuffers 1.12, but it only works with flatbuffers 2.0! This problem will only appear when you try to generate the tflite model. However, it already fails to import (from tflite_model_maker.config import ExportFormat will break!) because of a dependency on libportaudio2. Solutions: Before anything else, add this line to your notebook: !sudo apt -y -qq install libportaudio2 and add this line AFTER installing tflite-model-maker: !pip uninstall -qy flatbuffers && pip install -q flatbuffers==2.0

I am working on another project that is related and I will be uploading a new version of the notebooks in a few days... but TensorFlow team's track record tells me you simply cannot trust them without creating something like a docker image to make sure your stuff will still run after you just finished typing it :smile:

ricardodeazambuja commented 1 year ago

Apparently this bug was solved from the TensorFlow side... now everything is working after a small fix to how the TFLite model was getting the output tensors