Closed grinono closed 4 years ago
@grinono Which version of tfjs are you using in project? You may need to upgrade to the latest version.
tfjs-react-native uses WebGL/OpenGL for compute.
yes, I'm using the latest version: "@tensorflow/tfjs-react-native": "^0.2.3" Any other ideas on where to look for a fix?
@grinono I meant to ask what version of "@tensorflow/tfjs" itself you are using (so in addition to the react native adapter). Could you post the dependencies in your package.json here.
@tafsiri here all the TensorFlow related packages
"@tensorflow-models/blazeface": "^0.0.5",
"@tensorflow-models/handpose": "^0.0.3",
"@tensorflow-models/mobilenet": "^2.0.4",
"@tensorflow-models/posenet": "^2.2.1",
"@tensorflow/tfjs": "^1.7.0",
"@tensorflow/tfjs-react-native": "^0.2.3",
Thanks!
I think i found the source of this. @annxingyuan handpose does a check specifically for the backend name being equal to WebGL, this will exclude backends like react-native or we-chat that extend webgl but are named differently. Could we use some other way of testing backend capabilities here? e.g. possibly WebGL related flags.
This makes tfjs-node
fail, too. The backend name it reports is tensorflow
and so the if clause goes through the else case throwing an error.
Just pushed a new version (0.0.4) of https://www.npmjs.com/package/@tensorflow-models/handpose, could you give it a try and let us know if it works.
@grinono could you please let us know if this issue has been resolved for you ?
We moved into a different direction. So i have not checked it. Our intention was adding client-side liveness detection. Where a few questions with hand pose instructions could give an indication on liveness.
Thanks for letting us know. Going to close this one.
Hi @tafsiri Hope you are doing good. I am stuck with similar issue. I am trying this in react native. let predictions = await model.estimateHands(nextImageTensor) It gets stuck in this line.
currently using "@tensorflow-models/handpose": "0.0.6" but tried with "@tensorflow-models/handpose": "0.0.4" also. getting same issue.
I try to run the Handpose model in react native via tfjs-react-native.
It returns [Error: Handpose is not yet supported by the rn-webgl backend - rotation kernel is not defined.]
I thought tfjs-react-native used native bindings instead of webgl? is this a setting somewhere? i run the following code in expo.