reneweb / react-native-tensorflow

A TensorFlow inference library for react native
Apache License 2.0
358 stars 59 forks source link

Tensorflow dense pose estimation support #30

Closed jafar-albadarneh closed 6 years ago

jafar-albadarneh commented 6 years ago

Is there any plans to support importing & using tesnorflow dense pose. I tried to replicate what's in the docs at tfjs.

I installed the package @tensorflow-models/posenet as well as the @tensorflow/tfjs@0.11.7. then had a simple method to load the posenet model as follows:

componentDidMount() {
    this.loadNet();
  }

  async getDensePose()
  {
    const imageScaleFactor = 0.50;
    const flipHorizontal = false;
    const outputStride = 16;
    const net   = await posenet.load();
    const pose = net.estimateSinglePose(
      require('./images/sample.jpg'), 
      imageScaleFactor,
      flipHorizontal,
      outputStride);
    console.log('pose estimation result'+pose);

  }

but unfortunately having this error: Unhandled JS Exception: No backend found in registry.

Any idea ! Thanks

reneweb commented 6 years ago

sorry for late response - Haven't looked into supporting this - generally speaking it would be nice to be able to just use tfjs within react native by providing some integration, but not sure how possible that is

im-aditya commented 5 years ago

Any chance @jafar-albadarneh you were able to run Posenet in React Native ??