Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
texture size [0x0] is invalid #377
I am trying to use ml5 to create my own image classifier for different health of coral. I want to be able to use my images to train and test the classifier. I am able to upload the images, train the data, but cannot classify an image.
I am using Node.js on Chrome Version 74.0.3729.157. I am using ml5 0.2.5 and p5 0.8.0
Here is my code: train() and predict() are called by button clicks
@L1391 - thanks so much for using the library and for raising this issue. Unfortunately, ml5 requires the use of the browser to run so the ml5 functionality won't work without it (e.g. in node.js). ml5.js uses tensorflow.js which uses the browser's GPU to run all the fancy calculations. As a result, all of the functionality that ml5.js is built on is based around using the browser GPU.
We hope to have ml5.js run in node-js sometime in the near future (especially now that node support for tensorflow is a thing: https://www.tensorflow.org/js/guide/nodejs) but the current ml5 setup does not support node.js
Thanks + happy coding!
Hi @L1391 - Yes, but there's some caveats:
A number of the ml5 sketches don't currently work in the p5 web editor due to some of the ways that the editor handles data files and some of the network communication regarding making requests to external data (e.g. the big model files that allow ml5.js to run things like image detection, etc). Some of those issues have popped up here (ml5js/ml5-examples#6)
There are lots of developments in the p5 web editor as well as in ml5 to make sure these environments all play nicely together, but the best thing to do is to try and run things locally if possible. Thanks!