Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

yolov4-tiny-relu-new_coords-tpu on edgetpu too slow #82

Open
alan303138 opened this issue May 1, 2021 · 4 comments
Open

yolov4-tiny-relu-new_coords-tpu on edgetpu too slow #82

alan303138 opened this issue May 1, 2021 · 4 comments

Comments

@alan303138
Copy link

I am using yolov4-tiny.weights with yolov4-tiny-relu-new_coords.cfg and using yolov4-tiny-relu-new_coords-tpu.cfg convert to tflite with compile.
But the perform on the edgetpu is 60sec per image.

btw,the yolov4-tiny-relu.cfg and yolov4-tiny-relu-tpu.cfg on edgetpu is 0.18 per img.

Yolov4:v3.1.0
tf:2.4.1

@hhk7734
Copy link
Owner

hhk7734 commented May 1, 2021

Would you share your tflite file?

@alan303138
Copy link
Author

@hhk7734
Copy link
Owner

hhk7734 commented May 3, 2021

The new_coords part is added in version 3.2.0.

tensorflow-yolov4 (3.2.0) unstable; urgency=medium
* config: add yolov4-tiny-relu-new_coords.cfg
* c_src: layers: add yolo_tpu_layer_new_coords
* c_src, common, tf, tflite, mAP: add prob_thresh
* config: add yolov4-tiny-relu-new_coords-tpu.cfg
* common: base_class: modify text
-- Hyeonki Hong <[email protected]> Mon, 22 Feb 2021 01:30:53 +0900

and your model is the below. Perhaps you are not using the -a option.
Ref: #20 (comment)

image

@hhk7734
Copy link
Owner

hhk7734 commented May 3, 2021

yolov4-tiny-relu-tpu model outputs are 4, x1, logistic(x1), x2, logistic(x2).
and yolov4-tiny-relut-new_coords outputs are 2, logistic(x1), logistic(x2).
So ,in yolov4 3.1.0, if you try to predict new_coords, outputs are 2, but yolov4 try to find 4 outputs, because 3.1.0 don't know new_coords.
Since the computational part is in C, the output difference could probably go beyond the allocated memory and cause problems with the system itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants