Unable to create model file 'detect.tflite' to use with TensorFlow Lite!
I executing the following command:
bazel run --config=opt tensorflow/lite/toco:toco -- --input_file=../../models/research/object_detection/TFLite_model/tflite_graph.pb --output_file=../../models/research/object_detection/TFLite_model/detect.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_values=128 --change_concat_input_ranges=false --allow_custom_ops
Command response:
> INFO: Analysed target //tensorflow/lite/toco:toco (0 packages loaded). INFO: Found 1 target... Target //tensorflow/lite/toco:toco up-to-date: bazel-bin/tensorflow/lite/toco/toco INFO: Elapsed time: 0.423s, Critical Path: 0.00s INFO: 0 processes. INFO: Build completed successfully, 1 total action INFO: Running command line: bazel-bin/tensorflow/lite/toco/toco '--input_file=../../models/research/object_detection/TFLite_model/tflite_graph.pb' '--output_file=../../models/research/object_detection/TFLite_model/detect.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_values=128' '--change_concat_input_ranges=false' --alINFO: Build completed successfully, 1 total action 2020-01-10 19:27:36.435310: F tensorflow/lite/toco/toco_convert.cc:45] Check failed: port::file::Exists(input_file.value(), port::file::Defaults()).ok() Specified input_file does not exist: ../../models/research/object_detection/TFLite_model/tflite_graph.pb.
Although file is exists. I have checked it properly. Also I put the file in the same directory despite not working.
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce
=================================================
No I don't have written custom code yet. Also I am not using GPU.
Cloned tensorflow here; and also from here I am executing the bazel command: /home/hasan/TensorFlow/addons/tensorflow/
TensorFlow models are located here: /home/hasan/TensorFlow/models/research/object_detection/
Trained Model Location: /home/hasan/TensorFlow/workspace/human_detect_model/training/
Ubuntu 18.04.3 LTS TensorFlow version 1.13.2 Bazel 0.18
Try using the full path to the model instead of the relative path from the current directory.
@gargn @thisishasan
Hi, i am getting the same error although using the full path as you suggested.
INFO: Build completed successfully, 1 total action
2020-02-26 11:39:57.469927: F tensorflow/lite/toco/toco_convert.cc:45] Check failed: port::file::Exists(input_file.value(), port::file::Defaults()).ok() Specified input_file does not exist: /Users/AA/Desktop/Semester G/Project/keras-retinanet/snapshots/ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb.
Is there any other solution?
Versions: TensorFlow version 2.1.0 Bazel version 2.0.0 Working on mac.
Thank you in advance, Alon.
@gargn @thisishasan
Hi, i am getting the same error although using the full path as you suggested.
INFO: Build completed successfully, 1 total action 2020-02-26 11:39:57.469927: F tensorflow/lite/toco/toco_convert.cc:45] Check failed: port::file::Exists(input_file.value(), port::file::Defaults()).ok() Specified input_file does not exist: /Users/AA/Desktop/Semester G/Project/keras-retinanet/snapshots/ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb.Is there any other solution?
Versions: TensorFlow version 2.1.0 Bazel version 2.0.0 Working on mac.
Thank you in advance, Alon.
Hi Alon, did you find a solution to this?
Hello. Where you able to solve this
Okay I solved this by including the full path to the model