Attempting to run a custom model (based on MobileDet) using PyCoral
Below code is how I ran it. Basing it off of the example provided for object detection (which does work when using the sample coco mobilenet model)
Not entirely sure what is going wrong here - any help would be greatly appreciated!
Below I am using the parrot image (provided from the classification example) for object detection
Will include the relevant files in a zip
(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.
(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