TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi
TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi copied to clipboard
ValueError: Cannot set tensor: Dimension mismatch. Got 3 but expected 1 for dimension 3 of input 88.
I kinda wanted to save some time as i had a deadline so i went to teachable machine to train a small object detection classifier and downloaded the model.tflite file and labels.txt file. I replaced the value referring so that trivial errors are cleared and when i run the script python objectDetection.py --modeldir=converted_tflite/ I get the follwing error
Traceback (most recent call last): File "/home/ubuntupi/Desktop/ObjectDetection_Inference/objectDetection.py", line 175, in <module> interpreter.set_tensor(input_details[0]['index'],input_data) File "/home/ubuntupi/.local/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 572, in set_tensor self._interpreter.SetTensor(tensor_index, value) ValueError: Cannot set tensor: Dimension mismatch. Got 3 but expected 1 for dimension 3 of input 88.