Open KLT1003 opened 4 years ago
hello,i am doing the same work and i do not konw how to convert my yolov4.weights to tflite,could you give me some suggestions?
Hello, I have encountered the same problem. Have you solved it now? How? @KLT1003 @zhang0225
Hello, I have encountered the same problem. Have you solved it now? How? @KLT1003 @zhang0225
Hi,Firstly,you need to satisify the requirements,and then,please use save_model.py to convert .weigths to tf model.finally,use convert_tflite.py to convert tf model to tflite,you can reference to the commands mentioned by author
@yp19940913 No unfortunately I haven't been able to solve this issue. I've tried both via .weights -> .pb -> .tflite and .weights -> .h5 -> .tflite to no avail. FWIW: TFLite and probably also the TFLiteConverter only supports SSD based models for object detection (which is my desired use case) according to https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_mobile_tf2.md
After run save_model.py, i found when two file named model.data and model.index were put into the folder named /checkpoints/yolov4-tiny-416/variables, then run convert_tflite.py, it worked. @KLT1003
My .weights generated via (https://towardsdatascience.com/yolov4-in-google-colab-train-your-custom-dataset-traffic-signs-with-ease-3243ca91c81d) are working fine. But after I start the converting steps to .pb and .tflite it stops working during inference on my android device. I can see some NaNs during convert_tflite.py, but I have no idea how to proceed from here. Please advise.