Closed Grizzly2212 closed 6 years ago
By default, the featureExtractor
expects two classes to be classified. You need to add more than 1 image to be able to train a custom classifier. See https://ml5js.org/docs/FeatureExtractor#parameters
Yes, but what about that webgl_util.js:164 Uncaught (in promise) Error: Requested texture size [0x0] is invalid.
If you train a classifier with 1 image, the model will recognize everything as that one image. That doesn't make much sense. The error points to the fact that the model is searching for a second category of images to train, but it can't find one.
Output:
index.html.html:16 Model ready! index.html.html:25 Image added webgl_util.js:164 Uncaught (in promise) Error: Requested texture size [0x0] is invalid. Mobilenet.js:153 Uncaught (in promise) Error: Add some examples before training!
Expected Output
index.html.html:16 Model ready! index.html.html:25 Image added
I can not understand what the problem is.
Image used: