Skip to content

Commit

Permalink
tflite readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
anshkumar committed May 28, 2022
1 parent 97ebcfa commit fec8e82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ python train.py -tfrecord_train_dir 'path of TFRecord training files'
# Inference
Inside `saved_models` there will be saved graphs according to the score of their validation. For an example `saved_model_0.19968511` is saved_model when the validation loss was 0.19968511. To run inference on using this saved_model see `infer.py`.

# TFLite support
Please check `to_tflite.py` for converting `saved_mode.pb` to `.tflite` file.

# Reference
* https://github.com/feiyuhuahuo/Yolact_minimal
* https://github.com/dbolya/yolact
Expand Down
2 changes: 1 addition & 1 deletion to_tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def representative_dataset():
tf.lite.OpsSet.SELECT_TF_OPS # enable TensorFlow ops.
]
converter.inference_input_type = tf.uint8 # or tf.uint8
converter.inference_output_type = tf.uint8 # or tf.uint8
# converter.inference_output_type = tf.uint8 # or tf.uint8
tflite_quant_model = converter.convert()

open("yolact.tflite", "wb").write(tflite_quant_model)

0 comments on commit fec8e82

Please sign in to comment.