google-coral / pycoral

Python API for ML inferencing and transfer-learning on Coral devices
https://coral.ai
Apache License 2.0
359 stars 146 forks source link

Can't run custom tflite model using PyCoral #13

Closed patcombe closed 3 years ago

patcombe commented 3 years ago

(base) patrickcombe@MacBook-Pro pycoral % python3 examples/detect_image.py \ --model test_data/1127_MobileDet_output_model_1127ssdlite_mobiledet_edgetpu.tflite \ --labels test_data/classes.txt \ --input test_data/parrot.jpg \ --output ${HOME}/grace_hopper_processed.bmp ----INFERENCE TIME---- Note: The first inference is slow because it includes loading the model into Edge TPU memory. Traceback (most recent call last): File "examples/detect_image.py", line 108, in <module> main() File "examples/detect_image.py", line 85, in main interpreter.invoke() File "/Users/patrickcombe/opt/anaconda3/lib/python3.8/site-packages/tflite_runtime/interpreter.py", line 540, in invoke self._interpreter.Invoke() RuntimeError: external/org_tensorflow/tensorflow/lite/kernels/detection_postprocess.cc:426 ValidateBoxes(decoded_boxes, num_boxes) was not true.Node number 1 (TFLite_Detection_PostProcess) failed to invoke.

test_data.zip

thegreatcheese commented 3 years ago

Hi @patcombe, were you able to resolve this issue?