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.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.

Tensorflow lite Object Detection

0 votes

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

*http://jevois.org/tutorials/UserTensorFlowTraining.html

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 \

  --allow_custom_ops

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

http://jevois.org/basedoc/jvpkg_2modules_2JeVois_2PyClassificationDNN_2PyClassificationDNN_8py_source.html

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

http://jevois.org/basedoc/jvpkg_2modules_2JeVois_2PyDetectionDNN_2PyDetectionDNN_8py_source.html

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)
...