Closed SirTapir closed 4 years ago
Yes, this repo supports conversion to tflite. See the readme file for information. The example commands are as follows:
python convert_tflite.py --weights ./data/yolov4.weights --output ./data/yolov4.tflite
python convert_tflite.py --weights ./data/yolov4.weights --output ./data/yolov4-fp16.tflite --quantize_mode float16
python convert_tflite.py --weights ./data/yolov4.weights --output ./data/yolov4-fp16.tflite --quantize_mode full_int8 --dataset ./coco_dataset/coco/val207.txt
Full int 8 quantization is hit or miss. I found that leaky_relu is not supported and had to swap it for regular relu and retrain https://github.com/hunglc007/tensorflow-yolov4-tflite/issues/53. Training tiny YOLO is not well supported. But I made it work with some rather crude (but simple) hacks https://github.com/hunglc007/tensorflow-yolov4-tflite/issues/53#issuecomment-636383441
@sterlingrpi What about conversion of tiny-yolov3? When I tried to use the tiny version on the android example, the bounding box that was drawn is not correct.
not sure. I know for training tiny it took a couple of hacks. but I got it mostly working
@sterlingrpi Hi, do you know how to convert custom yolov4-tiny with depthwise separable convolution? tks
@KuoEuran looking at my project folder I was able to convert yolov3-tiny and yolov4 into tflite and int8 tflite. Sorry, no yolov4-tiny.
@sterlingrpi Thank you for your replying, my question is not the model convert of yolo model, I want to convert the separable depthwise convolution which added in yolo model. Have you solved the problems before?
@KuoEuran I have not
@sterlingrpi ok, I see, thanks
Can you convert a yolov3 or yolov4 model that was trained to detect custom object from Alexey's implementation to tflite?
What about the tiny version? Does this repo supports tiny yolo conversion?