TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi icon indicating copy to clipboard operation
TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi copied to clipboard

Help running webcam detection in raspberry 3b+

Open egamez099 opened this issue 4 years ago • 1 comments
trafficstars

Hi all,

I followed the tutorial entirely, successfully trained my custom ssd_mobilenet_v2_quantized_300x300_coco model with 7 classes to detect.

The issue comes when I try to run the webcam detection script, in the rpi 3b+, appears the next error:

RuntimeError: tensorflow/lite/kernels/detection_postprocess.cc:404 ValidateBoxes(decoded_boxes, num_boxes) was not true.Node number 98 (TFLite_Detection_PostProcess) failed to invoke.

The weirdest thing of all is the fact that if I run the exact same code in my workstation (with tf 1.15.1), the code works flawlessly, so it makes me think that there's something wrong with the raspberry.

The model was trained in Colab with tensorflow 1.15, and compiled with the following sintax:

!tflite_convert --graph_def_file=compiler/tflite_graph.pb --output_file=compiler/detect.tflite --output_format=TFLITE --input_shapes=1,300,300,3 --input_arrays=normalized_input_image_tensor --output_arrays='TFLite_Detection_PostProcess','TFLite_Detection_PostProcess:1','TFLite_Detection_PostProcess:2','TFLite_Detection_PostProcess:3' --inference_type=QUANTIZED_UINT8 --mean_values=128 --std_dev_values=128 --change_concat_input_ranges=false --allow_custom_ops

Any help will be so pleased. Thanks in advance!

egamez099 avatar Dec 12 '20 17:12 egamez099

@egamez099 Hi! Did you ever fix this error? I am having the same issue and when googling this error there seems to be limited fixes....

sbetts2 avatar Jul 08 '21 00:07 sbetts2