Tfjs: Tfjs with react ative

Created on 2 Sep 2018  路  10Comments  路  Source: tensorflow/tfjs

To get help from the community, check out our Google group.

TensorFlow.js version

Browser version

Describe the problem or feature request

Code to reproduce the bug / link to feature request

All 10 comments

Hi, could you add some more information about what issues you are having with react native? I know others have tried it in the past with some success https://github.com/tensorflow/tfjs/issues/192

thank's for your response .
i tried before building the project with windows and "tfjs" gave me a couple of warning messages

  1. it could not find the document
  2. it could not find a gpu or webgl i can't remember
    now im trying with linux is givien me this error
    357705c5-121e-497c-b084-02b6b2041170

Yeah we don't support react native right now so you might be able to get it to work with the cpu backend (i.e. setBackend('cpu')), but we can't make any guarantees. It maybe something we look into more in future but don't have any active work in that area going on.

@tafsiri i will try to set the backend to cpu i'm also trying some work around with webview i added a node prosessor to the app package and tried to include the tfjs-node and that did not work so currntly i'm trying to stream camera to the node then from the node i stream the base64 that im getting from the camera to the webview and all the tfjs proccessing will be inside the webview finger crose that will work.
by the way did tfjs.fromPixels accept base64?

@husseinabed All the best, feel free to email the mailing list if you find a working setup with react native. To your second question, tf.fromPixels does not take base64.

Going to close this for now.

@tafsiri any solutions for react native now?

@Davidzhu001 not at the moment, but it is something we are going to investigate, probably early 2019. The ongoing work to support OffscreenCanvas will probably be helpful for react native as well.

@tafsiri thanks man, if there is help i can give, i am willing to help. my apps are deeply relying on rn.

@tafsiri Any update on the react native support?

We just released a package for this! https://www.npmjs.com/package/@tensorflow/tfjs-react-native

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KienPM picture KienPM  路  3Comments

take-kuma picture take-kuma  路  3Comments

kylemcdonald picture kylemcdonald  路  3Comments

beele picture beele  路  3Comments

pranayaryal picture pranayaryal  路  4Comments