Comments (18)
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.
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.
I tried your update, but it is still very slow, I use webgl.
from human.
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 ofwebgl
? 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.
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.
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.
I only used the hand model, I have not tried other models, I can reach 30 FPS on the IOS device.
from human.
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.
Yes, I use Google Chrome browser on Android phones, and the iOS device model is iPhone XS MAX
from human.
Thanks.
Can I ask you to test on both Android and iPhone using WASM
and limit resolution to 720px?
from human.
No problem, I will use dozens of various types of Android devices, IOS devices for testing
from human.
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.
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.
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.
-
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.
-
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. -
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. -
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.
@SukeningChuang any updates?
from human.
I tested WASM and changed the resolution to 720px, which is still very slow
from human.
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)
- Using in a chrome extension HOT 1
- adding custom emotion model & post detection logic HOT 1
- gaze detection logic & comparison HOT 1
- human.match.find function allways return similarity 0 HOT 2
- Error: input error: type not recognized at U2 HOT 1
- human.tf.memory().numTensors after human.load() doesn't give zero HOT 5
- Similarity is above 50% with 2 different persons HOT 5
- npm run build fails HOT 2
- Cant run nodejs demo from commandline - browser is always true HOT 6
- No face detection in Windows 10 Chrome when the app is built with typescript HOT 12
- Nuxt 3 + Vite HOT 1
- Can't install dev-dependencies HOT 1
- Automatic Page Refresh on Image Detection with Human Library in Worker Environment HOT 5
- Wrong detection issue HOT 5
- Can not import ESM bundle for browser with NextJS 14 HOT 4
- Face IDs shift when a face disappears HOT 1
- About the gaze tracking HOT 1
- Webpack unable to handle @mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html HOT 3
- Human inferencing stops after ~5 mins on Chrome on Windows HOT 2
- Face recognition is not working HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from human.