ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.24k stars 16.22k forks source link

#Android support #723

Closed daggarwal01 closed 4 years ago

daggarwal01 commented 4 years ago

Does the YoloV5 weights (which are converted to .tflite format) are supported in android, for tensorflow lite implementation.

github-actions[bot] commented 4 years ago

Hello @daggarwal01, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

For more information please visit https://www.ultralytics.com.

glenn-jocher commented 4 years ago

@daggarwal01 export pipeline is pytorch > onnx > tflite. See the tutorials to get started: https://docs.ultralytics.com/yolov5

daggarwal01 commented 4 years ago

I tried converting the weights using this pipeline,I succeed in converting it from .pt to .onnx and then to .pb, but while converting it into .tflite using the below mention code ,it showed me error. I looked for all the options but still stuck.

Convert the model.

converter = tf.lite.TFLiteConverter.from_frozen_graph("./models/model_simple.pb",input_arrays=['main_input'],output_arrays=['main_output']) tf_lite_model = converter.convert()

Save the TF Lite model.

open('.models/model_simple.tflite', 'wb').write(tf_lite_model)

with tf.io.gfile.GFile('model.tflite', 'wb') as f: f.write(tflite_model)

glenn-jocher commented 4 years ago

@daggarwal01 since this error was generated by external packages, the best place to raise an issue and ask questions regarding your error is on the relevant package repo.

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.