I’m trying to use the TFLite Person Detection example project as a template and insert my own model that I’ve created using Teachable Machine. However, it’s not working as expected, and giving a “Invoke Failed()” error in the serial monitor when I run the script on my Nano 33 BLE. Can someone please take a look and tell me what I did wrong?
Here is how I approached it:
- Create a model with Teachable Machine
- Download my model as a keras file
- Convert from Keras model to tflite model, and then integer quantize the model using the code here: Google Colaboratory
- Convert from tflite to .cc using :
xxd -i converted_model.tflite > model_data.cc
- Replace value of g_person_detect_model_data_len with new value from my model_data.cc
- Replace model_data with new model data from my model_data.cc
- Use https://netron.app/ to visualize the network and see what MicroOpsResolvers need to be included. Include as necessary.
The only two files in the project that I touch at all are person_detection.ino and person_detection_model_data.cpp. Please help me figure out why it’s not working!!!
Has anyone deployed a teachable machine model to Arduino Nano BLE 33? If so, how did you do it?!