google-coral / libcoral

C++ API for ML inferencing and transfer-learning on Coral devices
https://coral.ai
Apache License 2.0
79 stars 43 forks source link

Hard coded posenet custom add functionality in MakeEdgeTpuInterpreter #10

Closed friissoren closed 2 years ago

friissoren commented 3 years ago

When I follow the code for the classify_image example, it setups the interpreter here: https://github.com/google-coral/libcoral/blob/master/coral/examples/classify_image.cc#L35

As far as I can see, that results in a call to tflite_utils MakeEdgeTpuInterpreter. Why does that function add custom operations related to the pose net? That shouldn't be necessary when doing image classification: https://github.com/google-coral/libcoral/blob/master/coral/tflite_utils.cc#L72

Of course, I might have misunderstood how this is supposed to work.

Namburger commented 2 years ago

@friissoren as you pointed out, it's actually not necessary to have the posenet decoder custom ops for classification example. However MakeEdgeTpuInterpreter is not made specifically for classification. It's actually just a convenience for initializing an interpreter that can be used for all purposes, including posenet, as you could see here: https://github.com/google-coral/libcoral/blob/master/coral/pose_estimation/test_utils.cc#L111

google-coral-bot[bot] commented 2 years ago

Are you satisfied with the resolution of your issue? Yes No