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

Slow #1188

Closed
Densen90 opened this issue May 10, 2024 · 4 comments
Closed

Slow #1188

Densen90 opened this issue May 10, 2024 · 4 comments
Labels
stat:awaiting response Awaiting response from author type:support Support issue

Comments

@Densen90
Copy link

Plugin Version or Commit ID

v0.14.1

Unity Version

2022.3.20f1

Your Host OS

MacOS

Target Platform

Android

Description

Hi there, I am using your plugin for BodyTracking to control a 3D avatar.

When running the code in the Editor, I roughly get a detection rate of 60 times p. second. But when deploying on android I get very different results.
On a Sony Xperia S5 II it works ok with around 30 det/sec. On a Google Pixel 3 (which is way older) it works ok with around 10-25 det/sec. But on a Huawai P20 pro it really lags and has a low detection rate, although the phone should be powerful enough. The render framerate is always much higher (>200 fps on editor and 60 fps on phone)

I am running Body tracking on "Async" with GPU inference, a preferred webcam width of 1280, a timout of 100000 microseconds, a lite model complexity annd smooth landmarks and segmentation disabled. Target is ARMv7

Do you have any idea on how it could run better? Can I have some setups or mechanisms to have the tracking reach the render framerate performance? Any help would be awesome!

Code to Reproduce the issue

No response

Additional Context

No response

@Densen90 Densen90 added the type:support Support issue label May 10, 2024
@homuler
Copy link
Owner

homuler commented May 11, 2024

Could you enable the profiler and investigate the cause?

@homuler homuler added the stat:awaiting response Awaiting response from author label May 11, 2024
@homuler
Copy link
Owner

homuler commented May 11, 2024

See also #1169 (comment)

@Densen90
Copy link
Author

Hi there, thanks for your answer. From the profiler it seems that the two most demanding operations are:

PostLateUpdate.FinishFrameRendering - Gfx.WaitForPresentOnGfxThread - Semaphore.WaitForSignal

and

PostLateUpdate.PlayerSendFrameComplete - PlayerEndOfFrame - CoroutineDelayedCalls - Solution.Run() [Coroutine.MoveNext] [Invoke] - WeCamTexture.GetPixels32 - Webcam.ProcessImage - Semaphore.WaitForSignal

It also seems, that when setting up a testvideo instead of the webcam, it even performs worse, because the testvideo is stuttering (showing maybe 1 frame per second) and therefore the tracking is also very slow. Maybe this helps.

Thanks for your assistance, really appreciate it!

@homuler
Copy link
Owner

homuler commented May 13, 2024

Will you share the screenshot like #768 (comment) or #1140 (comment)?

Please also let me know which scene you are running (can I assume that you're running the sample scene without change?).

It also seems, that when setting up a testvideo instead of the webcam, it even performs worse, because the testvideo is stuttering

Can it be the same issue as #1171?

@homuler homuler closed this as completed Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Awaiting response from author type:support Support issue
Projects
None yet
Development

No branches or pull requests

2 participants