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

Requested texture size [768x0] is invalid.

Open ooyay opened this issue 4 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?

    const featureExtractor = await ml5.featureExtractor('MobileNet')
    const features = await featureExtractor.infer(myImg)
    console.log(features)

→ Step 2: Screenshots or Relevant Documentation 🖼

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

Other relevant information, if applicable

→ Describe your setup 🦄

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

  • Web browser & version: latest
  • Operating System: windows
  • ml5 version you're using: v0.10.5

ooyay avatar Mar 15 '22 23:03 ooyay

Hi @ooyay, thanks for raising this. Could you please a little more context, what are you trying to achieve. The full code could also be helpful. You could use a tool, like the p5-webeditor to make it available to us.

tlsaeger avatar Mar 18 '22 17:03 tlsaeger

Hi @ooyay, thanks for raising this. Could you please a little more context, what are you trying to achieve. The full code could also be helpful. You could use a tool, like the p5-webeditor to make it available to us.

Am just trying to demo this KNNClassifier algorithm using documentation Quickstart Code, Looks there an issue with featureExtractor.infer() function..


image

p5js-example there something wrong here too 🤷‍♂️🤷‍♂️

ooyay avatar Mar 18 '22 20:03 ooyay

Hi @ooyay ,

The code should work if you add crossOrigin="anonymous" to your img tag, like so: Screenshot 2023-07-11 at 10 46 48 PM

My console after adding the attribute: Screenshot 2023-07-11 at 10 47 32 PM

Please see this question on Stack Overflow and the official documentation on crossOrigin for more information.

Miaoye

sproutleaf avatar Jul 12 '23 02:07 sproutleaf