Tflite object detection running on bare React Native

Hi all,

I am having successfully ran Android and Reactjs project with my custom tflite files.

I am working on a windows 10 machine and trying to migrate into React Native. I found the following recourses but they have all failed to work.

  1. React native tensorflow object detection - YouTube
    The above is an expo project. I need to work in bare react native project. So I created the project using
    npx react-native init test

However, when I tried to setup expo using the following instructions (Install Expo modules - Expo Documentation).

Unfortunately, I got this error:
› Installing ios pods…

pod install
Couldn’t install Pods. Updating the Pods project and trying again…
pod install --repo-update
Couldn’t install Pods. Updating the Pods project and trying again…
Uncaught Error CocoaPodsError: Command pod install failed.
└─ Cause: spawn pod ENOENT
‘pod’ is not recognized as an internal or external command,

I am on windows machine is there anyway I can resolve the above issue?

  1. react-native-tflite-camera
  2. tflite-react-native

I have tried the above non-expo components but they have lots of unmet dependencies issues and I cannot get them running. Anyone has a working configuration to share the package.json file?

Or is there another working resource which run tflite custom object detection on react native?

Hi @Raymond_Wong

These days Expo supports native dependencies without needing to switch to the Bare workflow.

One way you could do it is with

It has something called Frame Processors which allow you to call native code to do things like object detection.

I haven’t tried it yet, but I am experimenting with tflite and will probably use Vision Camera. Another possibility is writing an Expo Module.