human: faceres model returns null values for humangl backend
Issue Description After update Human to 2.9.3 and tf 3.20. face embedding always Nan
Steps to Reproduce Config Human as
Expected Behavior All work good and const found = result.face[0].embedding return 1024 array with values Environment Chrome 104.0.5112.102 (64 бит)
- Human library version?
- 2.9.3
- Built-in demo or custom code?
- Type of module used (e.g.
js
,esm
,esm-nobundle
)? - ‘https://cdnjs.cloudflare.com/ajax/libs/human/2.9.3/human.js’,
- TensorFlow/JS version (if not using bundled module)?
- ‘https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@3.20.0/dist/tf.min.js’,
- Browser or NodeJS and version (e.g. NodeJS 14.15 or Chrome 89)?
- Chrome 104.0.5112.102 (64 бит)
- OS and Hardware platform (e.g. Windows 10, Ubuntu Linux on x64, Android 10)?
- Windows 10
- Packager (if any) (e.g, webpack, rollup, parcel, esbuild, etc.)?
- not
- Framework (if any) (e.g. React, NextJS, etc.)?
- pure js
Diagnostics
- Check out any applicable diagnostic steps
Additional
- For installation or startup issues include your
package.json
- For usage issues, it is recommended to post your code as gist
- For general questions, create a discussion topic
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 45 (22 by maintainers)
@shurshilov i’m going to close this issue here - lets continue conversation in https://github.com/tensorflow/tfjs/issues/6822
(please provide info tfjs devs need when you can)
ok, so now we i have a confirmation of a root cause, i’ll work with tfjs team to figure it out
i don’t want to globally disable this feature as it has significant performance advantages
fyi, this feature enables usage of gl uniforms instead of textures in some places in glsl code so it speeds up model compilation as multiple models can be warmed-up/compiled in parallel so time to first result is about 2x faster
so you can disable it for your app for now:
config.backend = 'webgl'
as optimizations are not enabled for default
webgl
backend, only for my port which ishumangl
disable this optimization with
config.flags.WEBGL_USE_SHAPES_UNIFORMS = false
regarding serialization, avoid looping and doing things such as
charCodeAt
very simple approach: