jinyu121 / DW2TF

Darknet Weights to TensorFlow
GNU General Public License v3.0
219 stars 73 forks source link

Convert tiny-yolov3 to Tflite. #33

Open apoorvopen opened 5 years ago

apoorvopen commented 5 years ago

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.

weilanShi commented 5 years ago

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 commented 5 years ago

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.

nscotto commented 5 years ago

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.

peace195 commented 5 years ago

@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 👍

nscotto commented 5 years ago

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

peace195 commented 5 years ago

@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

nscotto commented 5 years ago

Thanks! Star deserved.

peace195 commented 5 years ago

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

spoorgholi74 commented 5 years ago

@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?

peace195 commented 5 years ago

@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 commented 5 years ago

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

spoorgholi74 commented 5 years ago

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

peace195 commented 5 years ago

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