hhk7734 / wiki.loliot.net

14 stars 9 forks source link

docs/lang/python/libraries/yolov4/python-yolov4-edge-tpu/ #10

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

YOLOv4 on Edge TPU | loliot

YOLOv4 on Edge TPU

https://wiki.loliot.net/docs/lang/python/libraries/yolov4/python-yolov4-edge-tpu

hampengit commented 2 years ago

My converted tensorflow model has 4 output tensors. their size is 13x13x18, 13x13x18, 26x26x18, 26x26x18. I think my final layer "yolo_tpu" is missing. Do you have any solution on this? Thanks a lot.

hhk7734 commented 2 years ago

@hampengit If you get 4 outputs, the outputs will probably be x1, sigmoid(x1), x2, sigmoid(x2). x1 and x2 are bounding box.

rossGardiner commented 2 years ago

What is the format for "val2017.txt"?

rossGardiner commented 2 years ago

I get segfault when converting yolov4-tiny-relu to tflite full_int8. Could you advise what packages and versions required for running this script?

Alternatively, if there is another way to convert yolov4-tiny-relu to int8 tflite, I would be interested to hear!

Many thanks, Ross

tino926 commented 2 years ago

Hi, I tried your scripts, however, I got very different results from cpu and edgetpu. In the follow image, left side is the result using cpu, right side is the result using edgetpu.

Is this normal?

hhk7734 commented 2 years ago

when making model, it use quantization to 8bit. so accuracy is lowered.

Heaven0612 commented 1 year ago

How to know "yolov4-tiny-relu-int8_edgetpu.tflite " Accuracy (mAP)

hhk7734 commented 1 year ago

@Heaven0612 You can refer to below urls. https://wiki.loliot.net/docs/lang/python/libraries/yolov4/python-yolov4-map https://github.com/hhk7734/tensorflow-yolov4/blob/master/py_src/yolov4/tf/utils/mAP.py

Heaven0612 commented 1 year ago

@hhk7734 thanks for your reply . But I want to know accuracy (mAP)after quantization. In your example we need have cfg and weight . If I convert to .tflite(FP16) ,How to know the .tflite file mAP