1

I'm working on a demo project involving Handpose and tensorflow libraries. Everything was working okay, but now, having done no changes to both the code nor the environment, the following error shows up:

Uncaught (in promise) Error: No backend found in registry.
at t.getSortedBackends (tfjs-core:17)
at t.initializeBackendsAndReturnBest (tfjs-core:17)
at t.get [as backend] (tfjs-core:17)
at t.makeTensor (tfjs-core:17)
at Xt (tfjs-core:17)
at Yt (tfjs-core:17)
at Object.eo [as decodeWeights] (tfjs-core:17)
at t.<anonymous> (tfjs-converter:17)
at tfjs-converter:17
at Object.next (tfjs-converter:17)

The tfjs-core reference exists within my index.html file:

<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core"></script>

And use handpose in my main.js file:

const load_model = async () => {
  const model = await handpose.load();
  console.log("Model loaded");
  model_label = document.getElementById("label");
  model_label.innerText = "Model loaded... press start tracking:"

  return model
}

I've checked the tfjs-core repository and there have been no new releases. I also tried to reference older stable version instead, but still having the same issue. I can't figure out what happened.

1 Answers1

1
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-converter"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgl"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/handpose"></script>

Tensorflow released 2.0.0, and now you must choose either tfjs-backend-webgl, tfjs-backend-cpu, or tfjs-backend-wasm to run your model. You're using handpose and for that you should use webgl.

Duplicate of Handpose tfjs Error - No backend found in registry