Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
Because of un-manageable amounts of spam despite our use of CAPTCHAs, email authorization, and other tools, we have discontinued this forum (see the 700k+ registered users with validated email addresses at right?). Please email us any questions or post bug reports and feature requests on GitHub at https://github.com/jevois -- The content below remains available for future reference.

Tensorflow lite Object Detection

0 votes

I'm developing a project using tensorflow 1.15 to detect multiple objects. To start with the JeVois card, I followed the tutorial: 


By following several online tutorials, I was able to customize and train my model. I've checked my model and it works fine on the computer. So I decided to export it in a lite version. I use the following command:

tflite_convert \

  --graph_def_file=tflite/tflite_graph.pb \

  --output_file=tflite/jevois_model.tflite \

  --input_format=TENSORFLOW_GRAPHDEF \

  --output_format=TFLITE \

  --input_shape=1,128,128,3 \

  --input_array=normalized_input_image_tensor \

  --output_arrays='TFLite_Detection_PostProcess','TFLite_Detection_PostProcess:1','TFLite_Detection_PostProcess:2','TFLite_Detection_PostProcess:3' \

  --inference_type=FLOAT \

  --input_data_type=FLOAT \


Once I get the model in  lite version, I change the name to model.tflite and I also create my labels file. However, when I try to make it work on the card, the following message is displayed 

Loading network

Please wait...

I've waited several minutes (20) and the model never initializes.  could you help me? Because I don't know what the problem could be.

asked Jan 21, 2020 in Programmer Questions by josantoniojl (140 points)

1 Answer

0 votes
Looks like you have 4 output arrays, but TensorFlowEasy only works with 1 output. So you would have to create your own JeVois module to handle your output format. The easiest is to use OpenCV and Python. Skip the conversion to TFlite for now as I am not sure how well that works with OpenCV. Just use your baseline trained TF network. Then look at these two:

For recognition only (identify what is in the image): jevois module PyClassifcationDNN


For detection + identification (find bounding boxes around objects and identify the objects): jevois module PyDetectionDNN


You can edit those modules in JeVois Inventor and adapt them to your particular output format.
answered Jan 28, 2020 by JeVois (46,580 points)