Skip to content

@tensorflow/tfjs-react-native can't be installed successfully expo 51  #8292

Open
@JRfan123

Description

@JRfan123

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

image

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions