Closed henryouly closed 2 years ago
@superkudo can you help with this one? I think it's a good learning task to mediapipe processing mechanism and how input frames are handled internally.
Get it,I will track and fix this one
I debug and compare the MediaPipe and SeedVRKit XXXLandMarksOutput called , find the MediaPipe don’t have call with null with frame pool 10, I will try to find the difference between MediaPiepPlugin and SeedVRKit,I think source input effect the called with null
I find the reason , It was because we set the Timeout Microsec to 0, the mideapipe is not track complete in timeout 0ms,so It callback null, In the demo it suggest set to 100000, I set it and callback null problem is solved
I made a change in https://github.com/SeedV/SeedUnityVRKit/pull/46/commits/db2d7d8dffa177666b3c7cb6b1d06857621c9203 that fixed the slow down on Windows.
But this commit also hides the root cause. In theory, if the image sent to mediapipe contains a valid posture, the result should not be
null
.My current guess is that it hits a queue size limit in mediapipe. It should first queue up some input frames until it's queue is full, then it would drop any new frames after, until there are spaces in the queue again.
There's a frame pool that can be used to control concurrency. Currently the setting is 10. There may be room to optimize to set it to queue size + 1.