Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not an object (evaluating 'env().platform.fetch') for poseNet in React Native #5167

Closed
ghost opened this issue Jun 3, 2021 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 3, 2021

System information

  • OS : Windows 10
  • Platform : Android
  • TensorFlow.js installed from npm
  • TensorFlow.js version:3.6.0
  • @tensorflow-models/tfjs-react-native version:0.5.0
  • @tensorflow-models/posenet version: 2.2.2

Describe the problem

I always get this response when I tried to load() the posenet from @tensorflow-models/posenet. I am using React Native CLI not Expo.
I installed and configured the packages as per the document.

Is TensorFlow supported for React Native CLI or just Expo projects?

@ghost ghost added the type:build/install label Jun 3, 2021
@rthadur
Copy link
Contributor

rthadur commented Jun 8, 2021

Yes React Native CLI is supported https://github.com/tensorflow/tfjs/tree/master/tfjs-react-native#step-1-create-your-react-native-app , you need to install all the expo dependencies even though you are not using the expo. Please refer a related issue here #4475

@rthadur rthadur self-assigned this Jun 8, 2021
@ghost
Copy link
Author

ghost commented Jun 8, 2021

Thanks for your response @rthadur

@ghost
Copy link
Author

ghost commented Jun 8, 2021

Can we have the . tflite file for poseNet bundled with the app ? If yes how do I get it. I can only download the .tflite file for it. And in the docs they specify some path for .json and .bin
How would I generate .json and .bin from .tflite for pose estimation?

@rthadur
Copy link
Contributor

rthadur commented Jun 8, 2021

Sorry,I did not quite get it , are you trying to use tflite models in tfjs ? if yes please refer here https://github.com/tensorflow/tfjs/blob/master/tfjs-tflite/README.md
cc @jinjingforever

@ghost
Copy link
Author

ghost commented Jun 9, 2021

Thanks again @rthadur

@rthadur rthadur closed this as completed Jun 9, 2021
@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant