google-coral / edgetpu

Coral issue tracker (and legacy Edge TPU API source)
https://coral.ai
Apache License 2.0
422 stars 124 forks source link

Anchor free on edgetpu #48

Closed bhack closed 4 years ago

bhack commented 4 years ago

As ancor free One stage object detection and kpts regression are going to be more and more popular can you add some kind of example on how to standardize ti handle these kind of models without using any Google/Coral team "canned solution"?

Generally all these research papers prefer pythorch code relase so It would be really useful to know to handle these models in Coral with an optimized pieline.

Also point 2 at coral-posenet mention some optimized custom ops for heatmap handling that instead It could be useful in general for anchor-free models.

See also: https://github.com/tensorflow/hub/issues/424 https://github.com/google-coral/tutorials/issues/1 https://github.com/google-coral/project-posenet/issues/16

mtyka commented 4 years ago

Currently we only support model conversion from tflite/tf though we hope to broaden support eventually. However assuming these models use supported ops there's no reason they couldn't be compiled for the edgetpu. As for point 2, the posenet decoder (heatmaps->keypoints) is here: https://github.com/google-coral/edgetpu/blob/master/src/cpp/posenet/posenet_decoder.cc We typically build this right into the graph as a custom op but you certainly don't have to - you could take this as a standalone decoder library and call it with any heatmaps/offsets/displacements.

bhack commented 4 years ago

So why you don't document or try any of the anchor-free models, as an example, so you will see if there is any tflite/tf bottleneck in the conversion?

Or is it just that Coral team don't find anchor free model enough interesting for the coral platform?

bhack commented 4 years ago

Also, I meant as a team you can just take one of these models, check with tflite/tf, and try to expand some helper objects API so that we can support kypts or kypts + bbox outputs instead of bbox only: https://github.com/google-coral/edgetpu/blob/master/edgetpu/detection/engine.py#L24

mtyka commented 4 years ago

Hi, thanks for suggesting some alternative models. They're definitely interesting as are many other models. Unfortunately, given the small size of our team, we're able to test only a limited number of models, and this one is currently not a priority. All the tools necessary to convert and compile models are available publicly, so we encourage you to experiment with different model architectures.

bhack commented 4 years ago

@mtyka At least could you plan to expand class/bbox to support also arbitrary keypoints regression in support classes? https://github.com/google-coral/edgetpu/blob/master/edgetpu/detection/engine.py#L24

bhack commented 4 years ago

Ok the new ticket on this specific subtopic is at https://github.com/google-coral/edgetpu/issues/51