Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

TensorFlow Object Detection API – tflite_convert

In the following code, we are defining the location of the frozen model .pb file and the corresponding tflite file. Then, we're resizing the input color image to (300,300) in shape for each of the three RGB axes and converting the image into a normalized tensor, which then becomes the input array for the conversion. There are four output arrays, all of which are defined as follows:

  • TFLite_Detection_PostProcess—detection boxes
  • TFLite_Detection_PostProcess:1detection classes
  • TFLite_Detection_PostProcess:2detection scores
  • TFLite_Detection_PostProcess:3number of detections
!tflite_convert \--graph_def_file=/content/models/research/fine_tuned_model/tflite_graph.pb \--output_file=/content/models/research/fine_tuned_model/burgerfries.tflite ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content