Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak of facemesh javascript solution with iris detection #3678

Closed
shirlyyang-tcc opened this issue Sep 8, 2022 · 6 comments
Closed
Assignees
Labels
legacy:face mesh Issues related to Face Mesh platform:javascript MediaPipe Javascript issues type:support General questions

Comments

@shirlyyang-tcc
Copy link

System information (Please provide as much relevant information as possible)

  • no
  • Chrome 105.0.5195.102
  • 0.4.1629159166
  • Bazel version:no
  • Solution (e.g. FaceMesh, Pose, Holistic):FaceMesh
  • Programming Language and version ( e.g. C++, Python, Java):JavaScript

I am developing a AR application on Web and recently we discovered that facemesh has the problem of memory leaking in version 0.4.1629159166 and 0.4.1633559619. And I tested version 0.4.1628005669 it does not have the same problem. But my application do need iris data while version 0.4.1628005669 does not support.

I checked the code that initialize() is called only once and image is sent after last onResult() was triggered.

I alse tested in offical demo (https://codepen.io/mediapipe/details/KKgVaPJ) and it causes memory leaks too. The image is the heapshot of facemesh in offical demo in which snapshot2 is taken 2 minutes after snapshot1.
企业微信截图_c2128243-721e-437b-961d-c5ae4bd72d45
As can be seen the main increase comes from HEAP32 arraybuffer.
image
企业微信截图_a085eed7-0aa3-40d8-8058-75ad33ce42d8

Is there any way to solve this problem in the iris versions or is it possible? Really urgent and looking forward to responses.

@kuaashish
Copy link
Collaborator

Hi @shirlyyang-tcc, Have you looked at this similar closed issue #1937 and #1937(comment). Please try the suggestion and revert back if further queries. Thank you!

@kuaashish kuaashish added legacy:face mesh Issues related to Face Mesh platform:javascript MediaPipe Javascript issues stat:awaiting response Waiting for user response labels Sep 8, 2022
@shirlyyang-tcc
Copy link
Author

Hi @shirlyyang-tcc, Have you looked at this similar closed issue #1937 and #1937(comment). Please try the suggestion and revert back if further queries. Thank you!

Yes I did read this issue and tryed the suggestions in the issue. I did check the code and reassured the face mesh was not initialize multiple times. An I tested the versions decribed in this response:#1937 (comment).
As it describes versions 0.4.1629159166 and now 0.4.1633559619 both have memory leaks, version 0.4.1628005669 does not have the problem but it does not support iris detection. Our application needs iris detection so we can't use version 0.4.1628005669. So the problem still exists.

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Sep 8, 2022
@kuaashish kuaashish assigned tyrmullen and unassigned kuaashish Sep 8, 2022
@kuaashish kuaashish added the stat:awaiting googler Waiting for Google Engineer's Response label Sep 8, 2022
@kuaashish kuaashish assigned kuaashish and unassigned tyrmullen May 2, 2023
@kuaashish kuaashish removed the stat:awaiting googler Waiting for Google Engineer's Response label May 2, 2023
@kuaashish
Copy link
Collaborator

Hello @shirlyyang-tcc,
We are upgrading the MediaPipe Legacy Solutions to new MediaPipe solutions However, the libraries, documentation, and source code for all the MediaPipe Legacy Solutions will continue to be available in our GitHub repository and through library distribution services, such as Maven and NPM.

You can continue to use those legacy solutions in your applications if you choose. Though, we would request you to check new MediaPipe solutions which can help you more easily build and customize ML solutions for your applications. These new solutions will provide a superset of capabilities available in the legacy solutions.

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label May 2, 2023
@github-actions
Copy link

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label May 10, 2023
@github-actions
Copy link

This issue was closed due to lack of activity after being marked stale for past 7 days.

@google-ml-butler
Copy link

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

@ayushgdev ayushgdev removed stat:awaiting response Waiting for user response stale labels May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:face mesh Issues related to Face Mesh platform:javascript MediaPipe Javascript issues type:support General questions
Projects
None yet
Development

No branches or pull requests

5 participants