Closed RTL8710 closed 1 year ago
@RTL8710 Would you please elaborate your query with complete details like the use case you are addressing, the embedded system you are targetting, and what do you mean by "structure of C language"?
Background: I would like to port the Mediapipe face dection model (face_detection_short_range.tflite)to embedded device(this part has been completed), question:use Python for model post-processing as shown in the screenshot? How do I need to parse Python like structures detection in embedded (C language)?
@RTL8710 MediaPipe uses PyBind11 internally for C++ integration in Python. However, in your use case, you need to parse output by python in C language. This can be done by embedding the python interpreter in C. Please check the PyBind11 documentation here for such use case.
Thank you very much for your answer!
Introducing the entire Mediapipe project requires the use of PyBind11, but using PyBind11 is too large for embedded systems, so it is not suitable. My embedded system TPU can already parse the output of the model, but how can the post-processing of the model output concisely parse the detection data structure (similar to the screenshot section)?
I looked at the source code TfLiteTensorsToDetectionsCalculator::ProcessCPU in the last few days and found the answer I needed.
@RTL8710 Would you please share on the solution that worked for you so that the community can also benefit for similar future requirements?
DecodeBoxes is model output decode,C language overwrite it。
How to efficiently and succinctly convert the output of the model into the structure of the C language by porting the mediapipe model (object_dection) to the arm embedded system? image