mediapipe
mediapipe copied to clipboard
Memory leak causes Firefox to freeze/crash when using mediapipe demos
System information Firefox 99.0 on Ubuntu 21.04 Firefox 99.0 on Windows 10
- Have I written custom code (as opposed to using a stock example script provided in MediaPipe): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4): Tested on Linux Ubuntu 21.04 and Windows 10
- Browser and version (e.g. Google Chrome, Safari) if the issue happens on browser: Firefox 99.0
- Programming Language and version ( e.g. C++, Python, Java): Javascript
- MediaPipe version: latest
- Solution ( e.g. FaceMesh, Pose, Holistic ): Primarily FaceMesh (but also tested on Pose, Holistic, and Hand models)
Describe the current behavior:
When running anything related to mediapipe on Firefox, the computer memory usage keeps rising up to the point where the browser is killed or the computer freezes. Memory is instantly freed when the relevant tab is closed. This was first noticed on a custom usage of FaceMesh, but seemed to happen on the provided demo examples as well.
Standalone code to reproduce the issue: Javascript provided demos https://google.github.io/mediapipe/getting_started/javascript.html
Other info / Complete Logs : I tested pure tf.js models and it does not seem to cause the same issue, so I'm positing is something related directly to Firefox <-> Mediapipe. I also checked the memory snapshots of the browser and while the memory profile shows a constant low value, browser memory usage (check by top/task manager) keeps rising. I know Firefox does not have guarateed support, but it would be critical for us to be able to run mediapipe for longer periods of time without crashing. I would really appreciate some help understanding this or figuring out some kind of workaround.
Firefox 101.0.1 here. Same issue but to free the memory I have to close the the browser. It does apply to every demo we've tried to this point. On edge everything works fine (the framerate is way lower though. Firefox does almos 60fps while edge 25....)
Hello @glefundes, 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.
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.
This issue was closed due to lack of activity after being marked stale for past 7 days.