Giter Club home page Giter Club logo

Comments (18)

vladmandic avatar vladmandic commented on May 18, 2024

compared to what? there has to be a baseline.

if you know of a better model, i'd be happy to investigate.

which backend are you using: webgl, wasm?
which browser?
what resolution? did you try reducing resolution.
what is the cpu on the phone? what fps are you seeing?

when filing an issue, please be more specific.

from human.

vladmandic avatar vladmandic commented on May 18, 2024

there was a serious performance regression introduced last week, it has been fixed in the last update and performance now should be 2x than before.

from human.

SukeningChuang avatar SukeningChuang commented on May 18, 2024

I tried your update, but it is still very slow, I use webgl.

from human.

vladmandic avatar vladmandic commented on May 18, 2024

please provide more information - what was the FPS performance before and what is performance now?
'still slow' doesn't help me to improve.

other questions

  • did you try wasm instead of webgl? webgl is best, but only if device has hardware-accelerated GPU
  • what resolution are you're using? and did you try reducing resolution?
  • what is the exact phone? saying huawei phones as general statement cannot be true, as different phones have very different performance.

from human.

SukeningChuang avatar SukeningChuang commented on May 18, 2024

In Qualcomm Snapdragon 855, the handheld FPS is about 8, while in mate20pro FPS, the handheld FPS is about 5. I'm sure the test phone I tried supports GPU acceleration. I tried to reduce the resolution, but still cannot improve performance.

from human.

vladmandic avatar vladmandic commented on May 18, 2024

decreasing resolution doesn't change much for webgl, but has big impact on wasm backend.

but 5-8 FPS is not 'very slow' for a mobile device.
did you see any other example app with higher FPS?

and is that with hand model only or with all models enabled?

from human.

SukeningChuang avatar SukeningChuang commented on May 18, 2024

I only used the hand model, I have not tried other models, I can reach 30 FPS on the IOS device.

from human.

vladmandic avatar vladmandic commented on May 18, 2024

So to summarize:

  • Full resolution
  • WebGL backend
  • Hands model only
  • Android with Snapdragon 855 runs at 8FPS
  • iPhone runs at 30FPS

Is this correct?

Only two remaining questions are:

  • which browser on Android phones are you using (so I can investigate WebGL implementation)
  • which iPhone model so I can compare directly?

from human.

SukeningChuang avatar SukeningChuang commented on May 18, 2024

Yes, I use Google Chrome browser on Android phones, and the iOS device model is iPhone XS MAX

from human.

vladmandic avatar vladmandic commented on May 18, 2024

Thanks.

Can I ask you to test on both Android and iPhone using WASM and limit resolution to 720px?

from human.

SukeningChuang avatar SukeningChuang commented on May 18, 2024

No problem, I will use dozens of various types of Android devices, IOS devices for testing

from human.

vladmandic avatar vladmandic commented on May 18, 2024

Android with Snapdragon 855 and iPhone XS Max should be enough - those are two well-known CPUs and should have comparable 3D performance.

from human.

SukeningChuang avatar SukeningChuang commented on May 18, 2024

After nearly a week of testing, the performance of the latest Qualcomm Snapdragon 865 is far inferior to the iPhone 8 series, and all Android phones will not exceed 12FPS.

from human.

vladmandic avatar vladmandic commented on May 18, 2024

That is good to know.

I'm asking about WASM testing as that relies on CPU far more than on GPU, so that will help me isolate the problem.
But WASM is really slow in initial image processing and that is why resolution should be limited to 720px.

from human.

vladmandic avatar vladmandic commented on May 18, 2024
  1. I've gained about 15% additional performance by forcing 16bit GPU operations. And since it doesn't result in resolution loss, I'll leave that enabled by default.

  2. looking at HW performance: under light 3D load, Qualcomm performs similar to Apple, but under heavy load it's much worse - difference is about 30% easily.
    But that's still not enough to explain full discrepancy.

  3. Seems like Chrome Mobile forces WebGL memory garbage collection, so textures do not remain cached: for each frame they need to be reuploaded and recalculated from scratch.
    I get similar 60% performance hit if I enable force manual deallocation after each frame on desktop, but almost no performance hit with manual deallocation on mobile since everything is already deallocated.
    But those settings are not tunable inside Chrome. Not to mention that documentation from Chrome Mobile is nearly non-existent.

  4. There's something wrong with Chrome Mobile handling of image buffers as if I bypass WebGL program execution and just upload data, it has latency of 60-70ms instead of expected 5-10ms - that limits top FPS to ~15FPS even if there is nothing done.
    I need to dig into this more.

Unfortunately, only alternative to Chrome is Firefox and it's well known it's really aggressive with WebGL memory garbage collection, so that makes it about even on Mobile and much worse on Desktop.

I'll keep this issue open for a bit longer in case there are further ideas...

from human.

vladmandic avatar vladmandic commented on May 18, 2024

@SukeningChuang any updates?

from human.

SukeningChuang avatar SukeningChuang commented on May 18, 2024

I tested WASM and changed the resolution to 720px, which is still very slow

from human.

vladmandic avatar vladmandic commented on May 18, 2024

i've went through all i could think of and not much that can be done on this layer.
closing as this needs to be addressed upstream in browser webgl implementation.

from human.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.