-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the libraries in non-browser NodeJS #33
Comments
I tried that too, but it looks like "@teachablemachine/image" isn't made for NodeJs at all. It tries to use Canvases and the dom to work with the images. Hopefully, a Node compatible version gets released soon. |
how does someone make something as useful as this... without thinking "hey someone might want to use this out-of-browser" |
Well, I'm stuck trying to get it running inside Java. The Savemodel export is broken, and the Keras model is incompatible with deeplearning4j's Keras import. Also a bit confusing that all examples are with a webcam, not showing how to get it running in NodeJS/Java/Browser/whatever to classify normal images via upload/post/filesystem. |
Hi @tr7zw and @steamp0rt thanks for filing the issue. We are working on the savedmodel export it should be fixed soon. And you're right we have not implemented nodeJs support. It's good to know that you would like to use it in this environment and we'll keep it in mind for future planning. |
Hi, Having the library work as attempted above would not be possible because it would require including node's We will add language to the readme to be more explicit these modules are meant for web users. |
Thanks for clarifying! |
After some playing around I was able to get it running in NodeJs with teachablemachine/image by doing some workarounds with jsdom and canvas, still a "native" version would be nice. |
Could you possibly share how you achieved that? I've been trying to do the same with canvas but have had no luck. |
Sure. I quickly threw together a git containing everything needed here. |
Thanks! I got something working too after a lot of trial and error, it's along the same idea as yours. Thanks for sharing! |
Just a note that the exporting to Tensorflow SavedModel is fixed in latest release. |
Added your repo to this section, thanks for that! https://github.com/googlecreativelab/teachablemachine-community/tree/master/libraries |
I found this issue when I was trying to figure out how to use my teachable machine model in Node.js. I thought I would comment in case others end up here wondering how to use their model in Node.js with Tensorflow.js. I created a starting template that might be helpful to others. (FYI it is not using the teachable machine library, only its exported trained model.) https://github.com/traumverloren/teachable-machine-image-nodejs-starter |
my code:
The text was updated successfully, but these errors were encountered: