GithubHelp home page GithubHelp logo

Comments (3)

gaikwadrahul8 avatar gaikwadrahul8 commented on August 26, 2024 1

Hi, @ZhongxuYang

Thank you for bringing this issue to our attention and as far I know, you can download model from kaggle here is link and please make sure select only Model Variations as TensorFlow.js option and download whichever model you want to use and once model got downloaded then please try to load the model with the help of below code snippet and it should work

const tf = require('@tensorflow/tfjs-node');

const modelPath = '/path/to/your/model.json';
const handler = tf.io.fileSystem(modelPath);
const model = await tf.loadLayersModel(handler);

You can also load a model composed of Layer objects, including its topology and optionally weights by below options also please refer to tf.loadLayersModel for examples :

  1. Load a model from an HTTP server.
  2. Save model's topology and weights to browser local storage; then load it back.
  3. Saving model's topology and weights to browser IndexedDB; then load it back.
  4. Load a model from user-selected files from HTML file input elements.

If issue still persists please let us know with error log for further investigation.

Thank you for your cooperation and patience.

from tfjs.

ZhongxuYang avatar ZhongxuYang commented on August 26, 2024

Hi, @ZhongxuYang

Thank you for bringing this issue to our attention and as far I know, you can download model from kaggle here is link and please make sure select only Model Variations as TensorFlow.js option and download whichever model you want to use and once model got downloaded then please try to load the model with the help of below code snippet and it should work

const tf = require('@tensorflow/tfjs-node');

const modelPath = '/path/to/your/model.json';
const handler = tf.io.fileSystem(modelPath);
const model = await tf.loadLayersModel(handler);

You can also load a model composed of Layer objects, including its topology and optionally weights by below options also please refer to tf.loadLayersModel for examples :

  1. Load a model from an HTTP server.
  2. Save model's topology and weights to browser local storage; then load it back.
  3. Saving model's topology and weights to browser IndexedDB; then load it back.
  4. Load a model from user-selected files from HTML file input elements.

If issue still persists please let us know with error log for further investigation.

Thank you for your cooperation and patience.

Thank you for your patient reply!

I have followed your tips to fulfill my needs. Proceed as follows:

  1. download model from kaggle here is link
  2. Pass the detectorConfig argument to the poseDetection.createDetector function call.
const loadHandpose = async () => {
  const detectorConfig: MoveNetModelConfig = {
    modelUrl: '/your/public/path',
  }
  detector = await poseDetection.createDetector(model, detectorConfig)
  startDetect()
}

from tfjs.

google-ml-butler avatar google-ml-butler commented on August 26, 2024

Are you satisfied with the resolution of your issue?
Yes
No

from tfjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.