ml5-library icon indicating copy to clipboard operation
ml5-library copied to clipboard

Problems with Weight File from Teachable Machine

Open apoorvaramak opened this issue 3 years ago • 2 comments

Dear ml5 community,

I'm submitting a new issue. Please see the details below.

→ Step 1: Describe the issue 📝

Did you find a bug? Want to suggest an idea for feature? When training teachable machine models, all of the newer one's I've created aren't working because there seems to be a problem with how the weight files are read, because all the old models are working. Using the code from the ml5 neural network docs does not fix this error I am getting.

→ Step 2: Screenshots or Relevant Documentation 🖼

Here's some helpful screenshots and/or documentation of the new feature image

→ Step 3: Share an example of the issue 🦄

Here's some example code or a demonstration of my feature in this issue, separate GitHub repo, or in the https://editor.p5js.org or codepen/jsfiddle/Glitch/etc...

when using the newmodel I am getting this error (which is in the folder newmodel) but when I use any of my older models (from fall 2020) they do not have this issue.

https://editor.p5js.org/aramakrishnan/sketches/YAn7uR9Jf

Other relevant information, if applicable

→ Describe your setup 🦄

Here's some helpful information about my setup...

  • Web browser & version: Firefox 99.0
  • Operating System: Windows 10
  • ml5 version you're using: 0.5.0
  • Any additional notes

apoorvaramak avatar Apr 07 '22 21:04 apoorvaramak

Thanks so much for reporting this @apoorvaramak -- I think we might need to take a look at the latest teachable machine code to see how they are exporting model files. It's been awhile since we've been able to maintain that part of the ml5 code base so your report here is a good reminder for us!

I can't guarantee when we might be able to look into this, but I can make a note about this!

joeyklee avatar Apr 08 '22 17:04 joeyklee

Hi @apoorvaramak also thanks from my side for reporting this. Can you tell what happens if you implement the model via the teachable-machine link? Does that work? I have used TM that way a few months ago and it worked completely fine. I know that we changed how ml5 is handling the way a model gets loaded if you forget the model.json in the URL, but this should not have any implications for the local model. I will also try to dig deeper in this the coming days. @joeyklee we could maybe talk to the TM people and find out if they changed something.

tlsaeger avatar Apr 08 '22 19:04 tlsaeger