tfjs: @tensorflow/tfjs-react-native can't be installed successfully expo 51
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): mac
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: not
- TensorFlow.js installed from (npm or script link): npx expo install @tensorflow/tfjs-react-native
- TensorFlow.js version:
- CUDA/cuDNN version:
Describe the problem
The conflict between expo camera @ “^ 13.4.4” resulted in installation dependency failure, but after expo 50, a new version of the camera is installed by default, and the new camera is not compatible with the old camera
expo document : https://docs.expo.dev/versions/latest/sdk/camera/
by the way: I want to use the transpose api about the image to handle image
const imageBuffer = await Image.resolveAssetSource(require("@/assets/images/dogs.jpg")).uri;
const imageData = await fetch(imageBuffer);
const imageBlob = await imageData.blob();
const imageArrayBuffer = await imageBlob.arrayBuffer();
const imageUint8Array = new Uint8Array(imageArrayBuffer);
// 将图像转换为 TensorFlow.js 张量并进行预处理
const imageTensor = decodeJpeg(imageUint8Array);
const inputImage = tf.transpose(imageTensor, [2, 0, 1]).expandDims(0).div(tf.scalar(255));
Provide the exact sequence of commands / steps that you executed before running into the problem
Any 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.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 25 (1 by maintainers)
Hi, @JRfan123
I apologize for the delayed response and @Jersyfi thank you for your pointers and I see Expo changelog from official documentation
You can find the old versions at expo-camera/legacy and expo-sqlite/legacy during SDK 51, and they will be removed in SDK 52.so following an initial assessment, it appears that updating@tensorflow/tfjs-react-nativeto support newer Expo versions might be required.I will raise this issue for discussion in our upcoming internal meeting and provide a status update soon. We are also open to contributions on this matter. Feel free to submit a pull request for our team’s review and we will take appropriate action to integrate your contribution if it aligns with our goals.
Thank you for your cooperation and patience.
Opened this PR https://github.com/tensorflow/tfjs/pull/8521 to resolve the issue with package updates and React Native architecture alignment.
Can we get an update on this, please? The package is pretty much unusable in its current state. Downgrading expo-camera to 13.4.4 leads to a bunch of other issues, so would be nice if this worked with more recent versions
Will this be supported or what?
In my case camera and model.predict working only on IOS (using expo go) but with android is like that the model is predicting nothing using estimatePoses 😦
any updates about this?
I’ve tried to use legacy camera and it is not working enought
Facing the same problem! 😦
Any updates on this topic?
At the moment i can’t continue the update to SDK51 but @JRfan123 already made a PR https://github.com/tensorflow/tfjs/pull/8306 that need attention. @gaikwadrahul8 can you please have a look at the changes? I overlooked it even if it is minimalistic but it makes sense with reading the changelog on
expo-camera.