DW2TF icon indicating copy to clipboard operation
DW2TF copied to clipboard

Convert tiny-yolov3 to Tflite.

Open apoorvopen opened this issue 5 years ago • 13 comments

Can you help me in converting the tiny-yolov3 model to .Tflite to run it on android? Please let me know if you have any leads for me.

apoorvopen avatar Aug 22 '19 07:08 apoorvopen

Can you help me in converting the tiny-yolov3 model to .Tflite to run it on android? Please let me know if you have any leads for me. Hello, have you succeeded in converting. weight to. tflite?

weilanShi avatar Sep 23 '19 05:09 weilanShi

Hello, I have succeeded in converting. weigths to. tflite. The steps are as follows: first, convert. weights. cfg to. pb and .ckpt, referring specifically to: https://github.com/jinyu121/DW2TF/issues/30 https://github.com/jinyu121/DW2TF/releases/tag/freez/tensorflow tool e_graph, then generate. pb. Finally, the tensorflow tool toco is used to convert to. tflite.

weilanShi avatar Sep 24 '19 10:09 weilanShi

Could you provide the commands you entered to get the tflite version from the darknet weights? I can't figure out what to enter for freezing the graph, I get errors on every trials, and your links don't work. Especially, I would like to convert weights of a self trained YoloV3 from darknet to TFlite.

Thank you in advance.

nscotto avatar Oct 14 '19 16:10 nscotto

@apoorvopen I did it here: https://github.com/peace195/tensorflow-lite-yolo-v3

Please try it. I would appreciate if you give me a star for this project 👍

peace195 avatar Oct 20 '19 15:10 peace195

Thanks, I will. Before I try, does it support different number of channels? (1 for grayscale images)

nscotto avatar Oct 20 '19 17:10 nscotto

@nscotto Yes, it does. Please change the size of your image in this line: https://github.com/peace195/tensorflow-lite-yolo-v3/blob/master/convert_weights_pb.py#L42

peace195 avatar Oct 20 '19 17:10 peace195

Thanks! Star deserved.

nscotto avatar Oct 21 '19 16:10 nscotto

@nscotto I need some helps: https://github.com/peace195/tensorflow-lite-yolo-v3/issues/1

peace195 avatar Oct 21 '19 16:10 peace195

@nscotto I need some helps: peace195/tensorflow-lite-yolo-v3#1

your repo only gets the common yolov3 config right? so if pruned or change it should be change accordingly?

spoorgholi74 avatar Nov 14 '19 11:11 spoorgholi74

@nscotto I need some helps: peace195/tensorflow-lite-yolo-v3#1

your repo only gets the common yolov3 config right? so if pruned or change it should be change accordingly?

Yes. You are correct.

peace195 avatar Nov 14 '19 12:11 peace195

@spoorgholi74 You can change the YOLO's structure at here: https://github.com/peace195/tensorflow-lite-yolo-v3/blob/master/yolo_v3.py

peace195 avatar Nov 15 '19 07:11 peace195

@peace195 yeah but it would be better to write a function to read the .cfg file instead of changing the lines

spoorgholi74 avatar Nov 15 '19 09:11 spoorgholi74

@spoorgholi74 I have a version of it. I will push the code when I have time. 👍

peace195 avatar Nov 15 '19 09:11 peace195