ios - How to handle tflite model to prevent "Phase Script Execution Failed" error in React Native App (Not Exp

The beginning of the app.tsx file for my react native app looks like this:import {PaintStyle, Skia} fr

The beginning of the app.tsx file for my react native app looks like this:

import {PaintStyle, Skia} from '@shopify/react-native-skia';
import React, {useEffect} from 'react';
import {StyleSheet, Text} from 'react-native';
import {
  Camera,
  useCameraDevice,
  useCameraPermission,
  VisionCameraProxy,
  Frame,
  useSkiaFrameProcessor,
} from 'react-native-vision-camera';
import { useTensorflowModel } from 'react-native-fast-tflite';
import RNFS from 'react-native-fs';

const plugin = VisionCameraProxy.initFrameProcessorPlugin('myPlugin', {});

it works perfectly this way. I have built the app and downloaded it to my iPhone using XCode and it builds perfectly. However, when I try to use a tensorflow model I have imported by adding the line: const modelPlugin = useTensorflowModel(require('../assets/model.tflite')); I get a "Phase Script Execution Failed with nonzero exit code" error from xcode and the build is not completed. I suspect the issue is with where the model is in my folder hierarchy even though I did exactly as directed on the react-native-fast-tflite github. Do I need to somehow save it as a Target in XCode or something? Any help is greatly appreciated.

I have isolated the issue to be the line: const modelPlugin = useTensorflowModel(require('../assets/model.tflite'));

Without it, the app builds. With it, there is an error. I have tried saving the model in the ios folder through XCode and adding it as a target, but this had no effect.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744332921a4568975.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信