mediapipe
mediapipe copied to clipboard
How to deal with the output of the face detection tflite model?
Hello! I am working on a simple AR personal project.
(In the process, I need help using mediapipe's tflite model.)
If you check the face_detection_short_range.tflite model with netron, the output is the same as above. (float32[1,896,1])
I want to get face detection information from this float array.
But I've looked through several codes and couldn't find it.
Can you give me some code to reference?
System information (Please provide as much relevant information as possible)
- Have I written custom code (as opposed to using a stock example script provided in Mediapipe):
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4): Android
- MediaPipe version: lastest
- Bazel version:
- Solution (e.g. FaceMesh, Pose, Holistic): face detection
- Programming Language and version ( e.g. C++, Python, Java): C++
Describe the expected behavior:
Standalone code you may have used to try to get what you need :
If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/repo link /any notebook:
Other info / Complete Logs : Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached:
Hi @hotstone1993 , Could you provide steps to reproduce this issue.
Sorry, I lacked an explanation. I was just wondering how to handle the results(float array) of the tflite model (face_detection_short_range.tflite) provided by mediapipe. (Because the result is in the shape of float32[1, 896, 16], float32[1, 896, 1] like the picture above, I don't know how this data is structured.) I tried to find the related code in the project, but it failed. So I wrote here to ask for advice.
Hi @hotstone1993 , Please check this code snippet to understand the output of tflite model .
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.
Closing as stale. Please reopen if you'd like to work on this further.
@sureshdagooglecom Late reply. Thank you very much.
@hotstone1993 did you figure out how to use the output shape correctly?