Tfjs: posenet demo folder does not work

Created on 3 Jun 2019  路  11Comments  路  Source: tensorflow/tfjs

The posenet demo folder does not work locally with the instructions provided. it will throw the following error in the browser:

Uncaught (in promise) Error: got multiplier type of object when it should be a number.
at Object.v [as assert] (util.ts:106)
at Object. (posenet.esm.js:2)
at posenet.esm.js:2

Does anybody know why this is?

All 11 comments

If you are using the instructions for the readme they are out of sync with the published package as we are preparing a new release. I would try the instructions on npm, if you have any trouble with those let us know. Thanks!

I saw that note, so are you saying that the actual demo is out of date and doesn't work with the published packages? The code you have published right now just doesn't work in github? It's just very confusing, because you can view a working demo linked to from both sets of instructions. What is out of sync between the npm and github installation instructions? they look basically the same. I'd really love to try this out, but i feel like i'm the only person that doesn't get how to make it work. Is there a working demo anywhere online?

@ericmcgregor Could you let me know which instructions in particular you are using so I can double check. You can also just put in a code snippet of what you are calling here in the issue.

My recommendation is to try these instructions (on NPM) (there is also a working demo linked to from that page). The API for posenet is changing so even if they look similar the code snippets are not the same. If that (the instructions on NPM) doesn't work, let us know as that would be a bug.

One noticeable difference between the two is that the .estimatePoses() function does not exist in the currently published version.

To further elaborate on why that is, what you seeing on GitHub are instructions for an as yet _unreleased_ version of posenet.

@tafsiri The demo linked inside the NPM instructions page is also not working (Talking about the Camera demo page), do you guys expect to get this fixed anytime soon?

Hey @tafsiri, I was not expecting to have to write my own demo files based on the instructions on NPM. I assumed that the demo folder would contain demo code that worked, and that the installation and build instructions would be what i would need to follow to build and run the demo locally. My understanding from the comments you made and on the github page was that maybe the installation instructions were out of date(?), but it seems like that is a misread of the intent.

If you download the github demo folder, and follow the instructions to install and build, the console will throw the error i listed above. That's all i understand.

I don't know enough about tensorflow or debugging to go through the code in NPM and figure out what the delta is between the two code bases. I know that makes me an unhelpful member of the dev community here. I know there are much more important pieces to work on, but getting a local demo and example that works out of the box would be really great for those of us less savy at coding but looking to learn by example.

Thanks for the updated steps to reproduce the problem.

Ping @tylerzhu-github, could you take a look at this? If the new package won't be out for a while can we revert the changes to the demo source?

Hi all,

The final PR has been approved for the new PoseNet release and I really look forward to seeing what you are building with PoseNet!!
https://github.com/tensorflow/tfjs-models/pull/227.

Sorry for the confusion and I can understand the frustration from your side.
We will be updating the PoseNet version number in the demo next week for sure.

If you want to use the demo with the new PoseNet library, you can temporarily using the following instructions:

  1. rm -r node_modules in posenet folder if thing messed up
  2. in the posenet folder: yarn
  3. in the posenet folder: yarn build && yalc push
  4. in the demos folder: yarn && yalc link @tensorflow-models/posenet
  5. in the demos folder: yarn watch

Best,
Tyler

Hey @tafsiri, I was not expecting to have to write my own demo files based on the instructions on NPM. I assumed that the demo folder would contain demo code that worked, and that the installation and build instructions would be what i would need to follow to build and run the demo locally. My understanding from the comments you made and on the github page was that maybe the installation instructions were out of date(?), but it seems like that is a misread of the intent.

If you download the github demo folder, and follow the instructions to install and build, the console will throw the error i listed above. That's all i understand.

I don't know enough about tensorflow or debugging to go through the code in NPM and figure out what the delta is between the two code bases. I know that makes me an unhelpful member of the dev community here. I know there are much more important pieces to work on, but getting a local demo and example that works out of the box would be really great for those of us less savy at coding but looking to learn by example.

First I wish to thank all teams and their members at Google to create such a great project.
I am having the same issue here, every time I clicked into camera.html it shows nothing, and if I go to console I can see its giving me the same message. Long story short, it wont work and everything I can find on the Internet is also out of date.
Surprisingly through, I forked this repository roughly a month ago, I found the old version in my forked repo works just fine following current demo setup instructions, so I`m guessing that new versions of demo would require a more accurate setup instruction.
I believe for now the best solution here for us beginners is find a old version of this and use that instead.
Hope this helps.

Hi @SkySway13,

This is Tyler and I am from Google working on PoseNet library. Thanks for reaching out! How are you! I am so excited to see what you are experimenting with PoseNet.

After knowing the issue, @dsmilkov released a new NPM package and updated the PoseNet library鈥檚 version yesterday:

https://github.com/tensorflow/tfjs-models/pull/234#issuecomment-500110651

Now all PoseNet models have switched to use the graph execution mode in TensorFlow.js

I am very glad that the camera demo in your previous fork works! If you want to sync to the latest commit and give the demo in the latest version a try too, I will be here to help and the same instruction as before should work. Feel free to reach out to us here anytime (If your current repo is synced before yesterday鈥檚 last commit, then try sync to the latest commit).

@SkySway13 just tried re-downloading the repo and got the demo folder to work! i'm looking forward to learning more about tfjs and posenet now. thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rlexa picture rlexa  路  3Comments

KienPM picture KienPM  路  3Comments

chrisdonahue picture chrisdonahue  路  3Comments

dhrumil83 picture dhrumil83  路  3Comments

beele picture beele  路  3Comments