Fixing TensorFlow Lite Dynamic Tensor Error and Optimizing Mask R-CNN on Raspberry Pi
I'm deploying a fine-tuned Mask R-CNN model (ResNet-101) on a Raspberry Pi 4 (4GB RAM) running Raspbian OS, using TensorFlow Lite v2.6 for aerial object detection. During inference, I get the following error:
Despite resizing all input images to 1024x1024, the model still expects dynamic input shapes. Here's the code for loading and running inference:
I'm also facing significant inference delays (~10 seconds per image). I attempted post-training quantization using float16 and int8, but the performance remains suboptimal.
What strategies can I use to fix the dynamic tensor error, optimize inference speed on Raspberry Pi, and improve detection accuracy for small objects in aerial imagery?
Despite resizing all input images to 1024x1024, the model still expects dynamic input shapes. Here's the code for loading and running inference:
I'm also facing significant inference delays (~10 seconds per image). I attempted post-training quantization using float16 and int8, but the performance remains suboptimal.
What strategies can I use to fix the dynamic tensor error, optimize inference speed on Raspberry Pi, and improve detection accuracy for small objects in aerial imagery?