MediaPipeUnityPlugin
MediaPipeUnityPlugin copied to clipboard
Sample app consume memory over 600MB
Plugin Version or Commit ID
v0.10.1
Unity Version
2021.3.4f
Your Host OS
MacOS 12.3
Target Platform
iOS
Target Device
iPhone 12
[Windows Only] Visual Studio C++ and Windows SDK Version
No response
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
No response
[iOS Only] XCode Version
13.4.1
Build Command
Download plugin from release
Bug Description
I built a sample app and it consumed memory of more than 600 MB. I want to reduce memory usage because my app often crashes due to memory limits.
I built <1> including StartScene and Holistic Scene, and built <2> including only StartScene.
And ScreenShots are the profile result.
- Can I optimize those texture2Ds that mediapipe use?
- What's going on in "Untracked Memory"?
Could you help me to optimize memory?
Steps to Reproduce the Bug
- build sample app for ios
- run and profile
Log
Screenshot/Video
<1> StartScene + Holistic Scene
<2> only StartScene
Additional Context
No response
Reduce webcamtexture resolution on the webcam component in the scene?
@ROBYER1 Sorry for the late reply. I'll check it soon. Do you have an idea what is going on "Untracked Memeory"?
@ROBYER1 Sorry for the late reply. I'll check it soon. Do you have an idea what is going on "Untracked Memeory"?
I don't but see if the webcamtexture resolution is the main cause first
I think there is possibility to lower the pooling parameter (default is 10) in TextureFramePool. Btw - don't you think there is a memory leak connected with webcam texture? Those textures seems to not be disposed after changing scenes.