[RN] Pose Detection not working on android.
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): Yes. I referred to the pose detection example.
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Monterey 12.0.1
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: Samsung Galaxy S10 5G
- TensorFlow.js installed from (npm or script link): npm
- TensorFlow.js version (use command below): ^0.8.0
- Browser version: Chrome 96.0
- Tensorflow.js Converter Version: ^3.11.0
- Expo version : 43.0.0
Describe the current behavior Pose estimation not working properly only on Android. (keypoints are detected, but very low score)
There was no error during preparation (load model, handleImageTensorReady). Also, camera preview works properly.
Describe the expected behavior Pose estimation should work same as IOS.
Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/CodePen/any notebook.
Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
package.json
"@tensorflow-models/pose-detection": "^0.0.6",
"@tensorflow/tfjs": "^3.11.0",
"@tensorflow/tfjs-react-native": "^0.8.0",
"expo": "~43.0.0",
"expo-camera": "~12.0.3",
"expo-file-system": "~13.0.3",
"expo-gl": "~11.0.3",
"expo-gl-cpp": "~11.0.1",
Did you get chance to check the working example provided here https://github.com/tensorflow/tfjs-examples/tree/master/react-native/pose-detection ?
@rthadur I tested the working example on both OS, but neither worked. (Galaxy S10 5G, iPhone 11 Pro)
Result
IOS : app crashed after warning: initialization of backend rn-webgl failed
Android : only black screen displayed.(both front/back camera) frame rate was about 4~5fps.
Test Process
- clone repo
yarn && yarn start- Scan QR code and launch app with Expo Go
I can confirm the same behaviour as @GwangjoGong using the examples https://github.com/tensorflow/tfjs-examples/tree/master/react-native/pose-detection on a Pixel 4a and a iPhone 8, namely, the iPhone crashed and the Android renders a blank black screen.
Hi,
This is likely to be caused by incompatible expo-gl and expo-gl-cpp. Please double check the version combination mentioned here. Any higher version of expo-gl and expo-gl-cpp might cause crash.
If the app doesn't work directly from the cloned repo, that might indicate some other problems.. I will need to borrow a pixel 4 somewhere for further testing:)
I had the same problem as @GwangjoGong using the example with a Galaxy A52s. When testing on a Iphone 12, the application just crashed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
related PR has been merged , closing this issue. Feel free to @mention to reopen if the issue still exists. Thank you
@rthadur @jinjingforever Thank you for the update. I've tested the example on Samsung Galaxy S10, but the example still not working properly.
Expected behavior
keypoints should be displayed just like the image on the README.md
Actual behavior App does not crashed, but the keypoints(green circles) not displayed properly. (only 1-2 circles shown randomly)
Test Process
- clone repo
yarn=> Failed witherror An unexpected error occurred: "https://registry.yarnpkg.com/colors/-/colors-1.4.2.tgz: Request failed \"404 Not Found\"".rm yarn.lockyarn && yarn start- set camera to front and adjust position to show my face and shoulder. (just like image on
README.md)