Skip to content

Instantly share code, notes, and snippets.

@StanCallewaert
Last active April 3, 2019 12:13
Show Gist options
  • Save StanCallewaert/dec020e8a915377d8ef530ce4954044e to your computer and use it in GitHub Desktop.
Save StanCallewaert/dec020e8a915377d8ef530ce4954044e to your computer and use it in GitHub Desktop.
Convert our current model to a model for the Edge TPU
python object_detection/export_tflite_ssd_graph.py \
--pipeline_config_path="pipeline.config" \
--trained_checkpoint_prefix="model.ckpt-500" \
--output_directory="output" \
--add_postprocessing_op=true
bazel run -c opt tensorflow/contrib/lite/toco:toco -- \
--input_file=output/tflite_graph.pb \
--output_file=output/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment